/** * {@inheritDoc} */ @Override public void readFully(byte[] b) throws IOException { this.in.readFully(b); }
/** * {@inheritDoc} */ @Override public void readFully(byte[] b, int off, int len) throws IOException { this.in.readFully(b, off, len); }
/** {@inheritDoc} */ @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { size = in.readInt(); data = new byte[size]; in.readFully(data, 0, size); }
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { id = in.readLong(); content = new byte[ in.readInt() ]; in.readFully( content ); }
/** {@inheritDoc} */ @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { ctx = GridBinaryMarshaller.threadLocalContext(); arr = new byte[in.readInt()]; in.readFully(arr); start = in.readInt(); } /** {@inheritDoc} */
@Override public A readObject(ObjectInput input) throws IOException, ClassNotFoundException { int size = this.size.isPresent() ? this.size.getAsInt() : IndexSerializer.UNSIGNED_BYTE.readInt(input); if (size == 0) return null; byte[] bytes = new byte[size]; input.readFully(bytes); return this.targetClass.cast(InetAddress.getByAddress(bytes)); }
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { if (in.readBoolean()) { accessType = AccessType.valueOf(in.readUTF()); } if (in.readBoolean()) { type = in.readUTF(); } if (in.readBoolean()) { content = new byte[ in.readInt() ]; in.readFully( content ); } }
@Override protected void read(ObjectInput in) throws IOException { int len = in.readInt(); code = new byte[len]; in.readFully(code); len = in.readInt(); args = new ArgsMap(len, debug); for (int i = 0; i < len; i++) { String key = in.readUTF(); String val = in.readUTF(); args.put(key, val); } }
@Override public SimpleMarshalledValue<T> readObject(ObjectInput input) throws IOException { int size = IndexSerializer.VARIABLE.readInt(input); byte[] bytes = (size > 0) ? new byte[size] : null; if (bytes != null) { input.readFully(bytes); } return new SimpleMarshalledValue<>(bytes); }
@Override public ClientMapping readObject(ObjectInput input) throws IOException { byte[] sourceAddress = new byte[IndexSerializer.UNSIGNED_BYTE.readInt(input)]; input.readFully(sourceAddress); int sourceNetworkMaskBits = IndexSerializer.UNSIGNED_BYTE.readInt(input); String destAddress = input.readUTF(); int destPort = IndexSerializer.UNSIGNED_SHORT.readInt(input); return new ClientMapping(InetAddress.getByAddress(sourceAddress), sourceNetworkMaskBits, destAddress, destPort); }
/** {@inheritDoc} */ @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { fully = in.readBoolean(); arr = new byte[in.readInt()]; if (fully) in.readFully(arr); else in.read(arr); } }
/** Reads an object from the given object input. * The object had to be saved by the {@link NbObjectOutputStream#writeSafely} method. * * @param oi object input * @return the read object * @exception IOException if IO error occured * @exception SafeException if the operation failed but the stream is ok * for further reading */ public static Object readSafely(ObjectInput oi) throws IOException { int size = oi.readInt(); byte[] byteArray = new byte[size]; oi.readFully(byteArray, 0, size); try { ByteArrayInputStream bis = new ByteArrayInputStream(byteArray); NbObjectInputStream ois = new NbObjectInputStream(bis); Object obj = ois.readObject(); bis.close(); return obj; } catch (Exception exc) { // encapsulate all exceptions into safe exception throw new SafeException(exc); } catch (LinkageError le) { throw new SafeException(new InvocationTargetException(le)); } }
byte type = in.readByte(); byte[] bytes = new byte[in.readInt()]; in.readFully(bytes);
byte[] hdr = new byte[RES_HEADER_SIZE]; in.readFully(hdr);
int len = in.readInt(); // IPv6 compatible byte addr[] = new byte[len]; in.readFully(addr); InetAddress inetAddr = InetAddress.getByAddress(addr); int port = in.readInt();
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { // read length of data array int length = in.readInt(); flowExecutionData = new byte[length]; // read in contents in full in.readFully(flowExecutionData); compressed = in.readBoolean(); }
@Override public void readExternal(ObjectInput objectInput) throws IOException { _hashCode = objectInput.readInt(); byte[] data = new byte[objectInput.readInt()]; objectInput.readFully(data); _serializable = new LazySerializable(data); }
@Override public void readExternal(ObjectInput objectInput) throws IOException { if (objectInput.readBoolean()) { int size = objectInput.readInt(); byte[] data = new byte[size]; objectInput.readFully(data); _cookieValue = CookieUtil.deserialize(data); } _dateValue = objectInput.readLong(); _intValue = objectInput.readInt(); String stringValue = objectInput.readUTF(); if (!stringValue.isEmpty()) { _stringValue = stringValue; } _type = Type.values()[objectInput.readInt()]; }
@Override public void readExternal(ObjectInput objectInput) throws ClassNotFoundException, IOException { int size = objectInput.readInt(); byte[] data = new byte[size]; objectInput.readFully(data); Deserializer deserializer = new Deserializer(ByteBuffer.wrap(data)); _declaringClass = deserializer.readObject(); _methodName = deserializer.readString(); int parameterTypesLength = deserializer.readInt(); _parameterTypes = new Class<?>[parameterTypesLength]; for (int i = 0; i < parameterTypesLength; i++) { _parameterTypes[i] = deserializer.readObject(); } }
public void readExternal (ObjectInput in) throws IOException, ClassNotFoundException { fieldNumber = in.readShort (); value = new byte[in.readShort()]; in.readFully (value); } }