/** * {@inheritDoc} */ @Override public int read() throws IOException { return this.in.read(); }
/** * Read this object from the input stream. * * @param in the input stream * @throws IOException if a read error occurs * @throws ClassNotFoundException if a class cannot be resolved */ public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException { locator = (EJBLocator<?>) in.readObject(); // ignore EOF int data = in.read(); if (data > 0) { async = true; } }
@Override protected void read(ObjectInput in) throws ClassNotFoundException, IOException { time = in.readLong(); int len = in.readInt(); byte[] bytes = new byte[len]; int ptr = 0; while (ptr < len) { ptr += in.read(bytes, ptr, len - ptr); } msg = new String(bytes, "utf-8"); }
forward = in.readBoolean(); primaryMapper = (EquationsMapper) in.readObject(); secondaryMappers = new EquationsMapper[in.read()]; for (int i = 0; i < secondaryMappers.length; ++i) { secondaryMappers[i] = (EquationsMapper) in.readObject();
@Override public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException { this.id = new UUID(in.readLong(), in.read()); this.createdDate = new DateTime(in.readUTF()); this.updatedDate = new DateTime(in.readUTF()); this.tableName = TableName.valueOf(in.readUTF()); this.targetRecordId = in.readLong(); this.changeType = ChangeType.valueOf(in.readUTF()); this.callContext = (DefaultCallContext) in.readObject(); this.recordId = in.readLong(); this.accountRecordId = in.readLong(); this.tenantRecordId = in.readLong(); }
/** {@inheritDoc} */ @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { readExternalMeta(in); xidVer = (GridCacheVersion)in.readObject(); invalidate = in.readBoolean(); timeout = in.readLong(); threadId = in.readLong(); startTime = in.readLong(); nodeId = U.readUuid(in); isolation = TransactionIsolation.fromOrdinal(in.read()); concurrency = TransactionConcurrency.fromOrdinal(in.read()); state = TransactionState.fromOrdinal(in.read()); }
/** {@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); } }
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { boolean hasBuffer = in.readBoolean(); if (hasBuffer) { int capacity = in.readInt(); int limit = in.readInt(); int position = in.readInt(); byte[] bytes = new byte[capacity]; int bytesRead = in.read(bytes); if (bytesRead != capacity) { throw new IOException( "Expected to read " + capacity + " bytes but only read " + bytesRead + " bytes."); } setBuffer(ByteBuffer.wrap(bytes, position, limit - position)); } else { this.buffer = null; } }
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { int size = in.readInt(); byte[] data = new byte[size]; in.read(data); @SuppressWarnings("unchecked") AvroReader<T> reader = (AvroReader<T>) recordReaderMap.get().get(className); if (reader == null) { reader = new AvroReader<T>( new SpecificDatumReader<T>(clazz), DecoderFactory.get().binaryDecoder(data, null) ); recordReaderMap.get().put(className, reader); } BinaryDecoder recordDataDecoder = DecoderFactory.get().binaryDecoder(data, reader.getDecoder()); avroObject = reader.getReader().read(null, recordDataDecoder); }
/** * {@inheritDoc} */ @Override public int read(byte[] b) throws IOException { return this.in.read(b); }
/** * {@inheritDoc} */ @Override public int read(byte[] b, int off, int len) throws IOException { return this.in.read(b, off, len); }
@Override public int read(byte[] b, int offset, int len) throws IOException { return in.read(b, offset, len); } @Override
@Override public int read(byte[] b, int offset, int len) throws IOException { return in.read(b, offset, len); } @Override
@Override public int read() throws IOException { return in.read(); }
@Override public int read(byte[] b) throws IOException { return in.read(b); }
@Override public int read(byte[] b) throws IOException { return in.read(b); }
@Override public int read() throws IOException { return in.read(); }
private void read(ObjectInput dis, byte[] toFill) throws IOException { int idBytes = 0; int toFillLength = toFill.length; while (idBytes < toFillLength) { // idBytes += dis.read(toFill, idBytes, (toFillLength - idBytes)); int dataRead = dis.read(toFill, idBytes, (toFillLength - idBytes)); if (dataRead == -1) { throw new IOException( "Unexpected EOF reached. Distributed MembershipID could not be read"); } idBytes += dataRead; } }
@Nullable @Override public byte[] readByteArray() throws IOException { final byte nullIndicator = readByte(); if (nullIndicator == LegacySerializerDefs.NULL_OBJECT) { return null; } final int length = readInt(); final byte[] data = new byte[length]; final int readLength = mInput.read(data); if (readLength != length) { throw new SerializationException("Expected byte[] of length " + length + " but only read " + readLength); } return data; }