Skip to content

Commit 978354b

Browse files
committed
refactor v2 code
1 parent d0b90bb commit 978354b

1 file changed

Lines changed: 0 additions & 73 deletions

File tree

  • src/main/java/org/hdf5javalib/hdffile/infrastructure/fractalheap

src/main/java/org/hdf5javalib/hdffile/infrastructure/fractalheap/FractalHeap.java

Lines changed: 0 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -519,77 +519,4 @@ public ChildInfo(HdfFixedPoint address, long blockOffset, boolean isDirect, HdfF
519519
this.blockSize = blockSize;
520520
}
521521
}
522-
523-
// public static long readVariableLong(byte[] bytes, int size) {
524-
// long val = 0;
525-
// for (int i = 0; i < size; i++) {
526-
// val |= (bytes[i] & 0xFFL) << (8 * i);
527-
// }
528-
// // If the most significant bit is set, check if all bits are 1 (undefined address)
529-
// if (size < 8 && (val & (1L << (size * 8 - 1))) != 0) {
530-
// long mask = (1L << (size * 8)) - 1;
531-
// if (val == mask) {
532-
// return -1L; // Undefined address
533-
// }
534-
// }
535-
// return val;
536-
// }
537-
//
538-
// private static class HdfReader {
539-
// private final SeekableByteChannel channel;
540-
//
541-
// public HdfReader(SeekableByteChannel channel) {
542-
// this.channel = channel;
543-
// }
544-
//
545-
// public void seek(long pos) throws IOException {
546-
// channel.position(pos);
547-
// }
548-
//
549-
// public byte readByte() throws IOException {
550-
// ByteBuffer bb = ByteBuffer.allocate(1);
551-
// channel.read(bb);
552-
// bb.flip();
553-
// return bb.get();
554-
// }
555-
//
556-
// public short readShort() throws IOException {
557-
// ByteBuffer bb = ByteBuffer.allocate(2).order(ByteOrder.LITTLE_ENDIAN);
558-
// channel.read(bb);
559-
// bb.flip();
560-
// return bb.getShort();
561-
// }
562-
//
563-
// public int readInt() throws IOException {
564-
// ByteBuffer bb = ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN);
565-
// channel.read(bb);
566-
// bb.flip();
567-
// return bb.getInt();
568-
// }
569-
//
570-
// public byte[] readBytes(int n) throws IOException {
571-
// ByteBuffer bb = ByteBuffer.allocate(n);
572-
// channel.read(bb);
573-
// bb.flip();
574-
// byte[] res = new byte[n];
575-
// bb.get(res);
576-
// return res;
577-
// }
578-
//
579-
// public long readVariableLong(int size) throws IOException {
580-
// byte[] bytes = readBytes(size);
581-
// long val = 0;
582-
// for (int i = 0; i < size; i++) {
583-
// val |= (bytes[i] & 0xFFL) << (8 * i);
584-
// }
585-
// // If the most significant bit is set, check if all bits are 1 (undefined address)
586-
// if (size < 8 && (val & (1L << (size * 8 - 1))) != 0) {
587-
// long mask = (1L << (size * 8)) - 1;
588-
// if (val == mask) {
589-
// return -1L; // Undefined address
590-
// }
591-
// }
592-
// return val;
593-
// }
594-
// }
595522
}

0 commit comments

Comments
 (0)