         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)
    }

    private var currentPointer: UnsafePointer <Void> {

        }
    }

    func scan(value: UInt8) throws {
        if try scan(value) == false {
            throw Error.generic("Cannot scan value")
        }
    }

    func scanString(maxCount: Int? = nil, encoding:NSStringEncoding = NSUTF8StringEncoding) throws -> String? {
