@ Override public void write ( byte [ ] buffer , int offset , int length , boolean isEnd ) throws IOException { int position = _position ; if ( length < 0 ) { throw new IllegalArgumentException ( ) ; } if ( _indexAddress < position + length ) { throw new IllegalArgumentException ( L . l ( "Segment write overflow pos=0x{0} len=0x{1} entry-head=0x{2} seg-len=0x{3}. {4}" , Long . toHexString ( _position ) , Long . toHexString ( length ) , Long . toHexString ( _indexAddress ) , Long . toHexString ( _segment . length ( ) ) , _segment ) ) ; } //try (StoreWrite sOut = _readWrite.openWrite(_segment.getAddress(), // _segment.getLength())) { _sOut . write ( _segment . getAddress ( ) + position , buffer , offset , length ) ; _position = position + length ; _isDirty = true ; }
Writes to the file from the WriteStream flush .