@Test public void writeALongTest() throws Exception { byte[] intLongBuffer = new byte[8]; for (int i = 1; i < 10; i++) { @SuppressWarnings("unchecked") ByteBufferFactory[] bufferFactorys = new ByteBufferFactory[] { new HeapByteBufferFactory(), new DirectByteBufferFactory() }; for (ByteBufferFactory bf : bufferFactorys) { System.out.println("i:" + i); MultiAutoGrowingByteBufferBackedFiler filer = new MultiAutoGrowingByteBufferBackedFiler(i, i, bf); UIO.writeLong(filer, Long.MAX_VALUE, "a long", intLongBuffer); filer.seek(0); Assert.assertEquals(UIO.readLong(filer, "a long", intLongBuffer), Long.MAX_VALUE, "Booya"); } } }
@Override public final void seek(long position) throws IOException { position(position); }
MultiAutoGrowingByteBufferBackedFiler implements IFiler { @Override public final void seek(long position) throws IOException { position(position); } }
MultiAutoGrowingByteBufferBackedFiler implements IFiler { @Override public final void seek(long position) throws IOException { position(position); } MultiAutoGrowingByteBufferBackedFiler(long initialBufferSegmentSize,
        long maxBufferSegmentSize,
        ByteBufferFactory byteBufferFactory); private  MultiAutoGrowingByteBufferBackedFiler(long maxBufferSegmentSize,
        ByteBufferFactory byteBufferFactory,
        ByteBufferBackedFiler[] filers,
        long length,
        int fShift,
        long fseekMask); }
MultiAutoGrowingByteBufferBackedFiler implements IFiler { @Override public final void seek(long position) throws IOException { position(position); } MultiAutoGrowingByteBufferBackedFiler(long initialBufferSegmentSize,
        long maxBufferSegmentSize,
        ByteBufferFactory byteBufferFactory); private  MultiAutoGrowingByteBufferBackedFiler(long maxBufferSegmentSize,
        ByteBufferFactory byteBufferFactory,
        ByteBufferBackedFiler[] filers,
        long length,
        int fShift,
        long fseekMask); MultiAutoGrowingByteBufferBackedFiler duplicateAll(); @Override final void seek(long position); @Override long skip(long skip); @Override long length(); @Override void setLength(long len); @Override long getFilePointer(); @Override void eof(); @Override int read(); @Override int read(byte[] b); @Override int read(byte[] b, int offset, int len); @Override void write(byte b); @Override void write(byte[] b, int offset, int len); @Override void close(); @Override void flush(boolean fsync); @Override Object lock(); }
MultiAutoGrowingByteBufferBackedFiler implements IFiler { @Override public final void seek(long position) throws IOException { position(position); } MultiAutoGrowingByteBufferBackedFiler(long initialBufferSegmentSize,
        long maxBufferSegmentSize,
        ByteBufferFactory byteBufferFactory); private  MultiAutoGrowingByteBufferBackedFiler(long maxBufferSegmentSize,
        ByteBufferFactory byteBufferFactory,
        ByteBufferBackedFiler[] filers,
        long length,
        int fShift,
        long fseekMask); MultiAutoGrowingByteBufferBackedFiler duplicateAll(); @Override final void seek(long position); @Override long skip(long skip); @Override long length(); @Override void setLength(long len); @Override long getFilePointer(); @Override void eof(); @Override int read(); @Override int read(byte[] b); @Override int read(byte[] b, int offset, int len); @Override void write(byte b); @Override void write(byte[] b, int offset, int len); @Override void close(); @Override void flush(boolean fsync); @Override Object lock(); static final long MAX_BUFFER_SEGMENT_SIZE; static long MAX_POSITION; }