void function ( ) { for ( int loc0 = 0 ; loc0 < BLOCK_LENGTH ; loc0 ++ ) { mTestStream . write ( INCREASING_BYTES [ loc0 ] ) ; Assert . assertEquals ( loc0 + 1 , mTestStream . getWrittenBytes ( ) ) ; } Assert . assertArrayEquals ( INCREASING_BYTES , Arrays . copyOfRange ( mTestStream . getBuffer ( ) . array ( ) , 0 , ( int ) BLOCK_LENGTH ) ) ; }
tests writing an increasing byte array one byte at a time . concode_field_sep byte[] INCREASING_BYTES concode_elem_sep long BLOCK_LENGTH concode_elem_sep TestBufferedBlockOutStream mTestStream concode_elem_sep ExpectedException mThrown concode_field_sep void byteArrayAtOffset concode_elem_sep void byteArrayWrite concode_elem_sep void before concode_elem_sep void doubleFlush concode_elem_sep void writePastBlock concode_elem_sep void remaining concode_elem_sep void writeToClosed