pread :: FileSystem -> File -> Int64 -> Int -> IO SB.ByteString
pread (FileSystem fs) (File f) offset len =
  allocaArray len $ \buf -> do
    nread <- throwErrnoIfMinus1 "pread" $
               c_hdfs_pread fs f (fromIntegral offset) buf (fromIntegral len)
    SB.packCStringLen (buf, fromIntegral nread)
pread :: FileSystem -> File -> Int64 -> Int -> IO SB.ByteString
pread (FileSystem fs) (File f) offset len =
  allocaArray len $ \buf -> do
    nread <- throwErrnoIfMinus1 "pread" $
               c_hdfs_pread fs f (fromIntegral offset) buf (fromIntegral len)
    SB.packCStringLen (buf, fromIntegral nread)
pread (FileSystem fs) (File f) offset len =
  allocaArray len $ \buf -> do
    nread <- throwErrnoIfMinus1 "pread" $
               c_hdfs_pread fs f (fromIntegral offset) buf (fromIntegral len)
    SB.packCStringLen (buf, fromIntegral nread)