@Override public void readFully(byte[] buf) throws IOException { wrapped.readFully(buf); }
@Override public void readFully(byte[] buf, int off, int len) throws IOException { wrapped.readFully(buf, off, len); }
@Override public byte[] readBytes() throws IOException { int len = inputStream.readInt(); if (len < 0) { return null; } else if (len == 0) { return new byte[]{}; } else { byte[] result = new byte[len]; inputStream.readFully(result); return result; } } }
@Override public byte[] readBytes() throws IOException { int len = inputStream.readInt(); if (len < 0) { return null; } else if (len == 0) { return new byte[]{}; } else { byte[] result = new byte[len]; inputStream.readFully(result); return result; } } }
/** {@inheritDoc} */ public void readFully(final byte[] buf, final int off, final int len) throws IOException { ois.readFully(buf, off, len); }
/** {@inheritDoc} */ public void readFully(final byte[] buf) throws IOException { ois.readFully(buf); }
@Override public void readFully(byte[] buf, int off, int len) throws IOException { wrapped.readFully(buf, off, len); }
/** {@inheritDoc} */ @Override public void readFully(@NotNull byte[] b) throws IOException { ois.readFully(b); }
/** {@inheritDoc} */ @Override public void readFully(@NotNull byte[] b, int off, int len) throws IOException { ois.readFully(b, off, len); }
/** {@inheritDoc} */ @Override public void readFully(@NotNull byte[] b) throws IOException { ois.readFully(b); }
/** {@inheritDoc} */ @Override public void readFully(@NotNull byte[] b, int off, int len) throws IOException { ois.readFully(b, off, len); }
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); int size = in.readInt(); byte[] bytes = null; if (size > 0) { bytes = new byte[size]; in.readFully(bytes); } this.bytes = bytes; }
private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException { ois.defaultReadObject(); byte[] ser = new byte[ois.readInt()]; ois.readFully(ser); this.thriftGrouping = TridentUtils.thriftDeserialize(Grouping.class, ser); } }
@Override public byte[] readBytes() throws IOException { int len = getObjectInputStream().readInt(); if (len < 0) { return null; } if (len == 0) { return new byte[0]; } if (len > MAX_BYTE_ARRAY_LENGTH) { throw new IOException("Byte array length too large. " + len); } byte[] b = new byte[len]; getObjectInputStream().readFully(b); return b; }
@Override public byte[] readBytes() throws IOException { int len = getObjectInputStream().readInt(); if (len < 0) { return null; } if (len == 0) { return new byte[0]; } if (len > MAX_BYTE_ARRAY_LENGTH) { throw new IOException("Byte array length too large. " + len); } byte[] b = new byte[len]; getObjectInputStream().readFully(b); return b; }
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); int len = in.readInt(); if (len < 0 || len > MAX_SIZE) { throw new IOException("Illegal buffer length " + len); } byte[] x = new byte[len]; in.readFully(x); fd = ByteBuffer.wrap(x); }
private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException { ois.defaultReadObject(); byte[] ser = new byte[ois.readInt()]; ois.readFully(ser); this.thriftGrouping = TridentUtils.thriftDeserialize(Grouping.class, ser); } }
private void readObject(ObjectInputStream in ) throws IOException, ClassNotFoundException { byte[] buf = new byte[in.readInt()]; in.readFully(buf); metadata = new Metadata(buf); }
private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); byte codecByte = in.readByte(); if (codecByte >= 0) { setCodec(Codec.forCodecByte(codecByte)); } int length = in.readInt(); if (length != 0) { byte[] json = new byte[length]; in.readFully(json); Schema schema = new Schema.Parser().parse(new String(json, ConfigConstants.DEFAULT_CHARSET)); setSchema(schema); } }
private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException { // read the non-transient fields in.defaultReadObject(); // read the default value field boolean hasDefaultValue = in.readBoolean(); if (hasDefaultValue) { int size = in.readInt(); byte[] buffer = new byte[size]; in.readFully(buffer); try (ByteArrayInputStream bais = new ByteArrayInputStream(buffer); DataInputViewStreamWrapper inView = new DataInputViewStreamWrapper(bais)) { defaultValue = serializer.deserialize(inView); } catch (Exception e) { throw new IOException("Unable to deserialize default value.", e); } } else { defaultValue = null; } } }