protected int fill (byte[] buffer, int offset, int count) throws KryoException { if (chunkSize == -1) // No current chunk, expect a new chunk. readChunkSize(); else if (chunkSize == 0) // End of chunks. return -1; int actual = super.fill(buffer, offset, Math.min(chunkSize, count)); chunkSize -= actual; if (chunkSize == 0) readChunkSize(); // Read next chunk size. return actual; }
protected int fill (byte[] buffer, int offset, int count) throws KryoException { if (chunkSize == -1) // No current chunk, expect a new chunk. readChunkSize(); else if (chunkSize == 0) // End of chunks. return -1; int actual = super.fill(buffer, offset, Math.min(chunkSize, count)); chunkSize -= actual; if (chunkSize == 0) readChunkSize(); // Read next chunk size. return actual; }
protected int fill (byte[] buffer, int offset, int count) throws KryoException { if (chunkSize == -1) // No current chunk, expect a new chunk. readChunkSize(); else if (chunkSize == 0) // End of chunks. return -1; int actual = super.fill(buffer, offset, Math.min(chunkSize, count)); chunkSize -= actual; if (chunkSize == 0) readChunkSize(); // Read next chunk size. return actual; }
protected int fill (byte[] buffer, int offset, int count) throws KryoException { if (chunkSize == -1) // No current chunk, expect a new chunk. readChunkSize(); else if (chunkSize == 0) // End of chunks. return -1; int actual = super.fill(buffer, offset, Math.min(chunkSize, count)); chunkSize -= actual; if (chunkSize == 0) readChunkSize(); // Read next chunk size. return actual; }
/** Advances the stream to the next set of chunks. InputChunked will appear to hit the end of the data until this method is * called. */ public void nextChunks () { if (chunkSize == -1) readChunkSize(); // No current chunk, expect a new chunk. while (chunkSize > 0) skip(chunkSize); chunkSize = -1; if (TRACE) trace("kryo", "Next chunks."); } }
/** Advances the stream to the next set of chunks. InputChunked will appear to hit the end of the data until this method is * called. */ public void nextChunks () { if (chunkSize == -1) readChunkSize(); // No current chunk, expect a new chunk. while (chunkSize > 0) skip(chunkSize); chunkSize = -1; if (TRACE) trace("kryo", "Next chunks."); } }
/** Advances the stream to the next set of chunks. InputChunked will appear to hit the end of the data until this method is * called. */ public void nextChunks () { if (chunkSize == -1) readChunkSize(); // No current chunk, expect a new chunk. while (chunkSize > 0) skip(chunkSize); chunkSize = -1; if (TRACE) trace("kryo", "Next chunks."); } }
/** Advances the stream to the next set of chunks. InputChunked will appear to hit the end of the data until this method is * called. */ public void nextChunks () { if (chunkSize == -1) readChunkSize(); // No current chunk, expect a new chunk. while (chunkSize > 0) skip(chunkSize); chunkSize = -1; if (TRACE) trace("kryo", "Next chunks."); } }