/** Marks the end of some data that may have been written by any number of chunks. These chunks can then be skipped when * reading. */ public void endChunks () { flush(); // Flush any partial chunk. if (TRACE) trace("kryo", "End chunks."); try { getOutputStream().write(0); // Zero length chunk. } catch (IOException ex) { throw new KryoException(ex); } } }
/** Marks the end of some data that may have been written by any number of chunks. These chunks can then be skipped when * reading. */ public void endChunks () { flush(); // Flush any partial chunk. if (TRACE) trace("kryo", "End chunks."); try { getOutputStream().write(0); // Zero length chunk. } catch (IOException ex) { throw new KryoException(ex); } } }
/** Marks the end of some data that may have been written by any number of chunks. These chunks can then be skipped when * reading. */ public void endChunks () { flush(); // Flush any partial chunk. if (TRACE) trace("kryo", "End chunks."); try { getOutputStream().write(0); // Zero length chunk. } catch (IOException ex) { throw new KryoException(ex); } } }
/** Marks the end of some data that may have been written by any number of chunks. These chunks can then be skipped when * reading. */ public void endChunks () { flush(); // Flush any partial chunk. if (TRACE) trace("kryo", "End chunks."); try { getOutputStream().write(0); // Zero length chunk. } catch (IOException ex) { throw new KryoException(ex); } } }
public void write(OutputStream out, T object) { KryoContext kryoContext = KRYOS.get(); OutputChunked output = kryoContext.getOutputChunked(); output.setOutputStream(out); writeObject(kryoContext.getKryo(), output, object); output.endChunks(); output.flush(); }