/* Key just read */
String key = bufIn.readUTF();
/* check if we want this key */
if ( key.equals(keyToExtract) )
{
int keySize = bufIn.readInt();
byte[] keyData = new byte[keySize];
bufIn.read(keyData, 0, keySize);
/* write the key data into a file */
RandomAccessFile raf = new RandomAccessFile(outputFile, "rw");