code: public void writeBinary(final PacketOutputStream pos) throws IOException {
      if (loadedStream == null) {
        writeObjectToBytes();
      }
      pos.writeFieldLength(loadedStream.length);
      pos.write(loadedStream);
    }
docs: Write data to socket in binary format.
  
  @param pos socket output stream
  @throws IOException if socket error occur