public int writeKey(OutputStream out) throws IOException {
  out.write(blockBuffer,keyOffset,klen);
  return klen;
}

public int writeKey ( OutputStream out ) throws IOException { out . write ( blockBuffer , keyOffset , klen ) ; return klen ; }
writing the key to the output stream . this method avoids copying key buffer from scanner into user buffer , then writing to the output stream .
