         }
         let position = Int(objectOffset + propertyOffset)
         do {
-            return try fromByteArray(position: position) as T
+            return try getScalar(at: position) as T
         } catch {
             return nil
         }

        }
        let position = Int(objectOffset + propertyOffset)
        do {
            return try fromByteArray(position: position)
        } catch {
            return defaultValue
        }

import Foundation

public protocol FBReader {
    
    var cache : FBReaderCache? {get}

    func getScalar<T : Scalar>(at offset: Int) throws -> T
    func bytes(at offset : Int, length : Int) throws -> UnsafeBufferPointer<UInt8>
    func isEqual(other : FBReader) -> Bool
}

