private void readChunkSize () { try { InputStream inputStream = getInputStream(); for (int offset = 0, result = 0; offset < 32; offset += 7) { int b = inputStream.read(); if (b == -1) throw new KryoException("Buffer underflow."); result |= (b & 0x7F) << offset; if ((b & 0x80) == 0) { chunkSize = result; if (TRACE) trace("kryo", "Read chunk: " + chunkSize); return; } } } catch (IOException ex) { throw new KryoException(ex); } throw new KryoException("Malformed integer."); }
private void readChunkSize () { try { InputStream inputStream = getInputStream(); for (int offset = 0, result = 0; offset < 32; offset += 7) { int b = inputStream.read(); if (b == -1) throw new KryoException("Buffer underflow."); result |= (b & 0x7F) << offset; if ((b & 0x80) == 0) { chunkSize = result; if (TRACE) trace("kryo", "Read chunk: " + chunkSize); return; } } } catch (IOException ex) { throw new KryoException(ex); } throw new KryoException("Malformed integer."); }
private void readChunkSize () { try { InputStream inputStream = getInputStream(); for (int offset = 0, result = 0; offset < 32; offset += 7) { int b = inputStream.read(); if (b == -1) throw new KryoException("Buffer underflow."); result |= (b & 0x7F) << offset; if ((b & 0x80) == 0) { chunkSize = result; if (TRACE) trace("kryo", "Read chunk: " + chunkSize); return; } } } catch (IOException ex) { throw new KryoException(ex); } throw new KryoException("Malformed integer."); }
private void readChunkSize () { try { InputStream inputStream = getInputStream(); for (int offset = 0, result = 0; offset < 32; offset += 7) { int b = inputStream.read(); if (b == -1) throw new KryoException("Buffer underflow."); result |= (b & 0x7F) << offset; if ((b & 0x80) == 0) { chunkSize = result; if (TRACE) trace("kryo", "Read chunk: " + chunkSize); return; } } } catch (IOException ex) { throw new KryoException(ex); } throw new KryoException("Malformed integer."); }