public BlockLogBuffer putLong( long l ) { byteBuffer.putLong( l ); return checkFlush(); }
public BlockLogBuffer putDouble( double d ) { byteBuffer.putDouble( d ); return checkFlush(); }
public BlockLogBuffer put( byte b ) { byteBuffer.put( b ); return checkFlush(); }
public BlockLogBuffer putShort( short s ) { byteBuffer.putShort( s ); return checkFlush(); }
public BlockLogBuffer putInt( int i ) { byteBuffer.putInt( i ); return checkFlush(); }
public BlockLogBuffer putFloat( float f ) { byteBuffer.putFloat( f ); return checkFlush(); }
public int write( ReadableByteChannel data ) throws IOException { int result = 0; int bytesRead; while ( (bytesRead = data.read( byteBuffer )) >= 0 ) { checkFlush(); result += bytesRead; } return result; } }
public BlockLogBuffer put( byte[] bytes, int length ) { for ( int pos = 0; pos < length; ) { int toWrite = Math.min( byteBuffer.remaining(), length - pos ); byteBuffer.put( bytes, pos, toWrite ); checkFlush(); pos += toWrite; } return this; }