@@ -5,7 +5,7 @@ import java.nio.channels.FileChannel
55import java .nio .file .{Files , Paths , StandardCopyOption }
66
77import org .apache .commons .io .IOUtils
8- import com .google .common .io .{ LittleEndianDataInputStream => DataInputStream }
8+ import com .google .common .io .LittleEndianDataInputStream
99import com .scalableminds .webknossos .wrap .util .ExtendedMappedByteBuffer
1010import com .scalableminds .webknossos .wrap .util .{BoxImplicits , ResourceBox }
1111import net .jpountz .lz4 .LZ4Factory
@@ -279,7 +279,7 @@ object WKWFile extends WKWCompressionHelper {
279279 }
280280
281281 def read [T ](is : InputStream )(f : (WKWHeader , Iterator [Array [Byte ]]) => T ): Box [T ] = {
282- ResourceBox .manage(new DataInputStream (is)) { dataStream =>
282+ ResourceBox .manage(new LittleEndianDataInputStream (is)) { dataStream =>
283283 for {
284284 header <- WKWHeader (dataStream, readJumpTable = true )
285285 } yield {
@@ -297,7 +297,7 @@ object WKWFile extends WKWCompressionHelper {
297297 (0 until header.numBlocksPerCube).foldLeft[Box [Array [Int ]]](Full (Array .emptyIntArray)) {
298298 case (Full (blockLengths), _) =>
299299 if (blocks.hasNext) {
300- val data = blocks.next
300+ val data = blocks.next()
301301 for {
302302 _ <- (data.length == header.numBytesPerBlock) ?~! error(" Unexpected block size" , header.numBytesPerBlock, data.length)
303303 compressedBlock <- if (header.isCompressed) compressBlock(header.blockType)(data) else Full (data)
0 commit comments