private void writeChunkSize () throws IOException { int size = position(); if (TRACE) trace("kryo", "Write chunk: " + size); OutputStream outputStream = getOutputStream(); if ((size & ~0x7F) == 0) { outputStream.write(size); return; } outputStream.write((size & 0x7F) | 0x80); size >>>= 7; if ((size & ~0x7F) == 0) { outputStream.write(size); return; } outputStream.write((size & 0x7F) | 0x80); size >>>= 7; if ((size & ~0x7F) == 0) { outputStream.write(size); return; } outputStream.write((size & 0x7F) | 0x80); size >>>= 7; if ((size & ~0x7F) == 0) { outputStream.write(size); return; } outputStream.write((size & 0x7F) | 0x80); size >>>= 7; outputStream.write(size); }
private void writeChunkSize () throws IOException { int size = position(); if (TRACE) trace("kryo", "Write chunk: " + size); OutputStream outputStream = getOutputStream(); if ((size & ~0x7F) == 0) { outputStream.write(size); return; } outputStream.write((size & 0x7F) | 0x80); size >>>= 7; if ((size & ~0x7F) == 0) { outputStream.write(size); return; } outputStream.write((size & 0x7F) | 0x80); size >>>= 7; if ((size & ~0x7F) == 0) { outputStream.write(size); return; } outputStream.write((size & 0x7F) | 0x80); size >>>= 7; if ((size & ~0x7F) == 0) { outputStream.write(size); return; } outputStream.write((size & 0x7F) | 0x80); size >>>= 7; outputStream.write(size); }
private void writeChunkSize () throws IOException { int size = position(); if (TRACE) trace("kryo", "Write chunk: " + size); OutputStream outputStream = getOutputStream(); if ((size & ~0x7F) == 0) { outputStream.write(size); return; } outputStream.write((size & 0x7F) | 0x80); size >>>= 7; if ((size & ~0x7F) == 0) { outputStream.write(size); return; } outputStream.write((size & 0x7F) | 0x80); size >>>= 7; if ((size & ~0x7F) == 0) { outputStream.write(size); return; } outputStream.write((size & 0x7F) | 0x80); size >>>= 7; if ((size & ~0x7F) == 0) { outputStream.write(size); return; } outputStream.write((size & 0x7F) | 0x80); size >>>= 7; outputStream.write(size); }
/** 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); } } }
private void writeChunkSize () throws IOException { int size = position(); if (TRACE) trace("kryo", "Write chunk: " + size); OutputStream outputStream = getOutputStream(); if ((size & ~0x7F) == 0) { outputStream.write(size); return; } outputStream.write((size & 0x7F) | 0x80); size >>>= 7; if ((size & ~0x7F) == 0) { outputStream.write(size); return; } outputStream.write((size & 0x7F) | 0x80); size >>>= 7; if ((size & ~0x7F) == 0) { outputStream.write(size); return; } outputStream.write((size & 0x7F) | 0x80); size >>>= 7; if ((size & ~0x7F) == 0) { outputStream.write(size); return; } outputStream.write((size & 0x7F) | 0x80); size >>>= 7; outputStream.write(size); }
/** 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); } } }