public void write(final InputStream instr) throws IOException {
  if (m_isSaved) {
    throw new IllegalStateException(ERR_ALREADY_SAVED);
  }
  final byte b[]=new byte[512];
  int r=instr.read(b);
  while (r == 512) {
    write(b,0,r);
    r=instr.read(b);
  }
  if (r != -1) {
    write(b,0,r);
  }
}

public void write ( final InputStream instr ) throws IOException { if ( m_isSaved ) { throw new IllegalStateException ( ERR_ALREADY_SAVED ) ; } final byte b [ ] = new byte [ 512 ] ; int r = instr . read ( b ) ; while ( r == 512 ) { write ( b , 0 , r ) ; r = instr . read ( b ) ; } if ( r != - 1 ) { write ( b , 0 , r ) ; } }
utility method that extracts data from the input stream
