Пример #1
0
 protected void readVariableData(final InputStream in, int bytesAlreadyRead) throws IOException {
   // ...now read in arguments (if any)
   do {
     AmfData dataItem = AmfDecoder.readFrom(in);
     addData(dataItem);
     bytesAlreadyRead += dataItem.getSize();
   } while (bytesAlreadyRead < header.getPacketLength());
 }
Пример #2
0
 protected void writeVariableData(final OutputStream out) throws IOException {
   if (data != null) {
     for (AmfData dataItem : data) {
       dataItem.writeTo(out);
     }
   } else {
     // Write a null
     AmfNull.writeNullTo(out);
   }
 }