protected byte[] read(DataInput dataInput) throws IOException {
  if (dataInput.readBoolean()) {
    int len=dataInput.readInt();
    byte[] bytes=new byte[len];
    dataInput.readFully(bytes);
    return bytes;
  }
 else {
    return null;
  }
}

protected byte [ ] read ( DataInput dataInput ) throws IOException { if ( dataInput . readBoolean ( ) ) { int len = dataInput . readInt ( ) ; byte [ ] bytes = new byte [ len ] ; dataInput . readFully ( bytes ) ; return bytes ; } else { return null ; } }
read part of a statement from an input stream .
