         }
     }
 
-    func scanBuffer(count: Int) throws -> UnsafeBufferPointer <Void>? {
-        if atEnd {
-            return nil
+    func scan(value: UInt8) throws {
+        if try scan(value) == false {
+            throw Error.generic("Cannot scan value")
         }
-        let scannedBuffer = UnsafeBufferPointer <Void> (start: buffer.baseAddress.advancedBy(current), count: count)
-        current = current.advancedBy(count)
-        return scannedBuffer
     }
 
     func scanString(maxCount: Int? = nil, encoding:NSStringEncoding = NSUTF8StringEncoding) throws -> String? {

        return string as String
    }

    var atEnd: Bool {
        return current == buffer.endIndex
    }

    func scanUpTo(byte: UInt8) throws -> UnsafeBufferPointer <UInt8>? {
        let start = current
        let buffer:UnsafeBufferPointer <UInt8> = self.buffer.toUnsafeBufferPointer()


    public var remaining: BufferType {
        return BufferType(start: buffer.baseAddress + current, count: buffer.count - current)
    }

    public var atEnd: Bool {
        return current == buffer.endIndex
    }

    private var currentPointer: UnsafePointer <Void> {
