protected void setLength ( long length ) throws IOException { if ( length < 0 ) throw new IllegalArgumentException ( "Invalid length: " + length ) ; synchronized ( this ) { file . seek ( 8 ) ; file . writeLong ( length ) ; if ( length == 0 ) setFirstIndex ( 0 ) ; } }
Sets the number of bytes currently contained by the FIFO .