List of usage examples for java.io ObjectInput readBoolean
boolean readBoolean() throws IOException;
From source file:com.splicemachine.derby.impl.sql.execute.operations.GroupedAggregateOperation.java
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { super.readExternal(in); isRollup = in.readBoolean(); groupedAggregateContext = (GroupedAggregateContext) in.readObject(); }
From source file:com.splicemachine.derby.stream.output.direct.DirectTableWriterBuilder.java
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { destConglomerate = in.readLong();/*w w w. ja v a 2s . co m*/ opCtx = (OperationContext) in.readObject(); skipIndex = in.readBoolean(); txn = SIDriver.driver().getOperationFactory().readTxn(in); }
From source file:com.splicemachine.derby.stream.output.insert.InsertTableWriterBuilder.java
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { isUpsert = in.readBoolean(); if (in.readBoolean()) operationContext = (OperationContext) in.readObject(); txn = SIDriver.driver().getOperationFactory().readTxn(in); pkCols = ArrayUtil.readIntArray(in); tableVersion = in.readUTF();/*from w ww. j a v a 2 s.c o m*/ execRowTypeFormatIds = ArrayUtil.readIntArray(in); execRowDefinition = (ExecRow) in.readObject(); autoIncrementRowLocationArray = new RowLocation[in.readInt()]; for (int i = 0; i < autoIncrementRowLocationArray.length; i++) autoIncrementRowLocationArray[i] = (RowLocation) in.readObject(); spliceSequences = new SpliceSequence[in.readInt()]; for (int i = 0; i < spliceSequences.length; i++) spliceSequences[i] = (SpliceSequence) in.readObject(); heapConglom = in.readLong(); }
From source file:com.splicemachine.derby.stream.output.update.UpdateTableWriterBuilder.java
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { if (in.readBoolean()) operationContext = (OperationContext) in.readObject(); heapConglom = in.readLong();// w w w . ja va2 s . c om formatIds = ArrayUtil.readIntArray(in); columnOrdering = ArrayUtil.readIntArray(in); if (columnOrdering == null) columnOrdering = new int[] {}; pkCols = ArrayUtil.readIntArray(in); if (pkCols == null) pkCols = new int[0]; pkColumns = (FormatableBitSet) in.readObject(); heapList = (FormatableBitSet) in.readObject(); tableVersion = in.readUTF(); txn = SIDriver.driver().getOperationFactory().readTxn(in); execRowTypeFormatIds = ArrayUtil.readIntArray(in); execRowDefinition = WriteReadUtils.getExecRowFromTypeFormatIds(execRowTypeFormatIds); }
From source file:com.delphix.session.service.ServiceUUID.java
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { super.readExternal(in); uuid = UUID.fromString(in.readUTF()); if (in.readBoolean()) { alias = in.readUTF();/*from w w w .j a v a 2 s . c om*/ } ephemeral = in.readBoolean(); }
From source file:com.splicemachine.derby.stream.output.delete.DeleteTableWriterBuilder.java
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { heapConglom = in.readLong();/* www. ja v a 2 s.c om*/ txn = SIDriver.driver().getOperationFactory().readTxn(in); if (in.readBoolean()) operationContext = (OperationContext) in.readObject(); }
From source file:com.talis.storage.s3.ExternalizableS3Object.java
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { this.setKey(in.readUTF()); this.setBucketName(in.readUTF()); this.setAcl((AccessControlList) in.readObject()); this.setMetadataComplete(in.readBoolean()); this.addAllMetadata((Map) in.readObject()); int length = in.readInt(); byte[] entity = new byte[length]; in.readFully(entity);// ww w . j av a 2 s. co m this.setDataInputStream(new ByteArrayInputStream(entity)); }
From source file:org.apache.axis2.context.externalize.MessageExternalizeUtils.java
/** * Read the Message// w w w . ja va2s . c o m * @param in * @param mc * @param correlationIDString * @return * @throws IOException */ public static SOAPEnvelope readExternal(ObjectInput in, MessageContext mc, String correlationIDString) throws IOException, ClassNotFoundException { if (log.isDebugEnabled()) { log.debug(correlationIDString + ":readExternal(): start"); } SOAPEnvelope envelope = null; // Read Prolog // Read the class name and object state String name = in.readUTF(); int revision = in.readInt(); if (log.isDebugEnabled()) { log.debug(correlationIDString + ":readExternal(): name= " + name + " revision= " + revision); } // make sure the object data is in a revision level we can handle if (revision != REVISION_2) { throw new ClassNotFoundException(ExternalizeConstants.UNSUPPORTED_REVID); } boolean gotMsg = in.readBoolean(); if (gotMsg != ACTIVE_OBJECT) { if (log.isDebugEnabled()) { log.debug(correlationIDString + ":readExternal(): end:" + "no message present"); } in.readInt(); // Read end of data blocks return envelope; } // Read optimized, optimized content-type, charset encoding and namespace uri boolean optimized = in.readBoolean(); String optimizedContentType = null; if (optimized) { optimizedContentType = in.readUTF(); } String charSetEnc = in.readUTF(); String namespaceURI = in.readUTF(); if (log.isDebugEnabled()) { log.debug(correlationIDString + ":readExternal(): " + "optimized=[" + optimized + "] " + "optimizedContentType=[" + optimizedContentType + "] " + "charSetEnc=[" + charSetEnc + "] " + "namespaceURI=[" + namespaceURI + "]"); } MessageInputStream mis = new MessageInputStream(in); StAXBuilder builder = null; try { if (optimized) { boolean isSOAP = true; builder = BuilderUtil.getAttachmentsBuilder(mc, mis, optimizedContentType, isSOAP); envelope = (SOAPEnvelope) builder.getDocumentElement(); envelope.buildWithAttachments(); } else { XMLStreamReader xmlreader = StAXUtils.createXMLStreamReader(mis, charSetEnc); builder = new StAXSOAPModelBuilder(xmlreader, namespaceURI); envelope = (SOAPEnvelope) builder.getDocumentElement(); envelope.build(); } } catch (Exception ex) { // TODO: what to do if can't get the XML stream reader // For now, log the event log.error(correlationIDString + ":readExternal(): Error when deserializing persisted envelope: [" + ex.getClass().getName() + " : " + ex.getLocalizedMessage() + "]", ex); envelope = null; } finally { if (builder != null) { builder.close(); } // Close the message input stream. This will ensure that the // underlying stream is advanced past the message. mis.close(); if (log.isDebugEnabled()) { log.debug(correlationIDString + ":readExternal(): end"); } } return envelope; }
From source file:com.splicemachine.derby.stream.function.RowAndIndexGenerator.java
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { heapConglom = in.readLong();/* w w w . j a v a 2s . co m*/ if (in.readBoolean()) operationContext = (OperationContext) in.readObject(); txn = SIDriver.driver().getOperationFactory().readTxn(in); pkCols = ArrayUtil.readIntArray(in); tableVersion = in.readUTF(); execRowDefinition = (ExecRow) in.readObject(); autoIncrementRowLocationArray = new RowLocation[in.readInt()]; for (int i = 0; i < autoIncrementRowLocationArray.length; i++) autoIncrementRowLocationArray[i] = (RowLocation) in.readObject(); spliceSequences = new SpliceSequence[in.readInt()]; for (int i = 0; i < spliceSequences.length; i++) spliceSequences[i] = (SpliceSequence) in.readObject(); heapConglom = in.readLong(); int iSize = in.readInt(); tentativeIndices = new ArrayList<>(iSize); for (int i = 0; i < iSize; i++) { byte[] message = new byte[in.readInt()]; in.readFully(message); tentativeIndices.add(DDLMessage.TentativeIndex.parseFrom(message)); } }
From source file:gridool.dht.ops.DropOperation.java
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { final int len = in.readInt(); final String[] idxNames = new String[len]; for (int i = 0; i < len; i++) { idxNames[i] = IOUtils.readString(in); }/*from w w w. ja v a2s . c om*/ this.idxNames = idxNames; this.async = in.readBoolean(); }