示例#1
0
 /**
  * Writes the given DataObject to an output stream.
  *
  * @throws IOException if an I/O error occurs.
  */
 public void write(DataCompound o, DataOutStream out) throws IOException {
   o.writeData(out);
 }
示例#2
0
 /**
  * Creates a new compound in read/write mode.
  *
  * @param writeMode true for write mode, false for read mode.
  */
 public DataCompound newCompound(boolean writeMode) {
   DataCompound c = newCompound();
   if (writeMode) c.setWriteMode();
   else c.setReadMode();
   return c;
 }
示例#3
0
 /**
  * Reads a DataObject from the given input stream and returns it.
  *
  * @throws IOException if an I/O error occurs.
  */
 public DataCompound read(DataInStream in) throws IOException {
   DataCompound o = newCompound();
   o.readData(in);
   return o;
 }