*/
public void load(InputStream is) throws IOException {
FressianReader reader = new FressianReader(is, FressianTraceFormat.READ_LOOKUP);
ByteArrayOutputStream os = new ByteArrayOutputStream();
FressianWriter writer = new FressianWriter(os, FressianTraceFormat.WRITE_LOOKUP);
Object obj;
while (null != (obj = reader.readObject())) {
writer.writeObject(obj);
if (obj instanceof TraceRecord) {
records++;
}
if (obj instanceof TraceRecord && os.size() > packetSize) {
conn.send(ZicoPacket.ZICO_DATA, os.toByteArray());
ZicoPacket rslt = conn.recv();
if (rslt.getStatus() != ZicoPacket.ZICO_OK) {
throw new ZicoException(rslt.getStatus(), "Error submitting data.");
}
bytes += os.size();
os = new ByteArrayOutputStream();
writer = new FressianWriter(os, FressianTraceFormat.WRITE_LOOKUP);
//System.out.print(".");
}
}
}