List of usage examples for java.io ObjectInput readObject
public Object readObject() throws ClassNotFoundException, IOException;
From source file:com.splicemachine.derby.impl.sql.execute.operations.scanner.TableScannerBuilder.java
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { template = (ExecRow) in.readObject(); scan = readScan(in);// ww w . j a va 2 s.c om if (in.readBoolean()) { rowColumnMap = new int[in.readInt()]; for (int i = 0; i < rowColumnMap.length; ++i) { rowColumnMap[i] = in.readInt(); } } txn = readTxn(in); keyColumnEncodingOrder = ArrayUtil.readIntArray(in); if (in.readBoolean()) { keyColumnSortOrder = ArrayUtil.readBooleanArray(in); } keyColumnTypes = ArrayUtil.readIntArray(in); if (in.readBoolean()) { keyDecodingMap = ArrayUtil.readIntArray(in); } if (in.readBoolean()) { baseColumnMap = ArrayUtil.readIntArray(in); } accessedKeys = (FormatableBitSet) in.readObject(); reuseRowLocation = in.readBoolean(); oneSplitPerRegion = in.readBoolean(); if (in.readBoolean()) indexName = in.readUTF(); if (in.readBoolean()) tableVersion = in.readUTF(); if (in.readBoolean()) { int n = in.readInt(); fieldLengths = new int[n]; for (int i = 0; i < n; ++i) { fieldLengths[i] = in.readInt(); } n = in.readInt(); columnPositionMap = new int[n]; for (int i = 0; i < n; ++i) { columnPositionMap[i] = in.readInt(); } baseTableConglomId = in.readLong(); } demarcationPoint = in.readLong(); if (in.readBoolean()) optionalProbeValue = (DataValueDescriptor) in.readObject(); pin = in.readBoolean(); if (in.readBoolean()) delimited = in.readUTF(); if (in.readBoolean()) escaped = in.readUTF(); if (in.readBoolean()) lines = in.readUTF(); if (in.readBoolean()) storedAs = in.readUTF(); if (in.readBoolean()) location = in.readUTF(); }
From source file:org.jclouds.blobstore.integration.internal.StubAsyncBlobStore.java
public MutableBlobMetadata copy(MutableBlobMetadata in) { ByteArrayOutputStream bout = new ByteArrayOutputStream(); ObjectOutput os;/*from w ww.j a v a2s . com*/ try { os = new ObjectOutputStream(bout); os.writeObject(in); ObjectInput is = new ObjectInputStream(new ByteArrayInputStream(bout.toByteArray())); MutableBlobMetadata metadata = (MutableBlobMetadata) is.readObject(); convertUserMetadataKeysToLowercase(metadata); return metadata; } catch (Exception e) { throw new RuntimeException(e); } }
From source file:jade.content.onto.SerializableOntology.java
/** *//*from w w w . ja v a 2 s . c o m*/ protected Object toObject(AbsObject abs, String lcType, Ontology globalOnto) throws UnknownSchemaException, UngroundedException, OntologyException { if (SERIALIZABLE.equals(abs.getTypeName())) { try { AbsPrimitive absValue = (AbsPrimitive) abs.getAbsObject(SERIALIZABLE_VALUE); String stringValue = absValue.getString(); byte[] value = Base64.decodeBase64(stringValue.getBytes("US-ASCII")); ObjectInput in = new ObjectInputStream(new ByteArrayInputStream(value)) { protected Class resolveClass(ObjectStreamClass v) throws IOException, ClassNotFoundException { if (myClassLoader != null) { // FIXME: Manage primitive class fields. Refactor with AgentMobilityService return Class.forName(v.getName(), true, myClassLoader); } else { return super.resolveClass(v); } } }; return in.readObject(); } catch (Throwable t) { throw new OntologyException("Error in object deserialization.", t); } } else { throw new OntologyException("Abs-object " + abs + " is not serializable"); } }
From source file:StringMap.java
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, ClassNotFoundException { boolean ic = in.readBoolean(); HashMap map = (HashMap) in.readObject(); setIgnoreCase(ic);//from w ww . java 2s. com this.putAll(map); }
From source file:org.perf.log.logger.PerfLogData.java
private String readStr(ObjectInput in) { // read length try {//from www . ja v a 2 s . c om int len = in.readInt(); if (len == 0) return null; else return (String) in.readObject(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); return null; } catch (ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); return null; } }
From source file:xbird.xquery.expr.path.PathExpr.java
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { final int numSteps = in.readInt(); final ArrayList<XQExpression> steps = new ArrayList<XQExpression>(numSteps); for (int i = 0; i < numSteps; i++) { XQExpression step = (XQExpression) in.readObject(); steps.add(step);//w w w. j a v a 2s .c om } this._steps = steps; final boolean hasAnalyzedExpr = in.readBoolean(); if (hasAnalyzedExpr) { this._analyzedExpr = (XQExpression) in.readObject(); } }
From source file:xbird.xquery.misc.StringChunk.java
public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException { this._strPool = (List<byte[]>) in.readObject(); this._cchunks = (char[][]) in.readObject(); this._cpointer = in.readLong(); }
From source file:BeanContainer.java
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { setDigital(in.readBoolean());/*from w w w . j a va 2 s. c o m*/ setBackground((Color) in.readObject()); setForeground((Color) in.readObject()); setPreferredSize((Dimension) in.readObject()); }
From source file:com.openbravo.pos.ticket.TicketInfo.java
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { m_sId = (String) in.readObject(); tickettype = in.readInt();//w ww. j a v a2s.c om m_iTicketId = in.readInt(); m_Customer = (CustomerInfoExt) in.readObject(); m_dDate = (Date) in.readObject(); attributes = (Properties) in.readObject(); m_aLines = (List<TicketLineInfo>) in.readObject(); m_User = null; m_sActiveCash = null; payments = new ArrayList<>(); // JG June 2102 diamond inference taxes = null; ticketstatus = in.readInt(); }
From source file:com.splicemachine.db.iapi.types.UserType.java
/** * @see java.io.Externalizable#readExternal * * @exception IOException Thrown on error reading the object * @exception ClassNotFoundException Thrown if the class of the object * is not found *///from www . ja v a 2 s . c om public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { boolean readIsNull = in.readBoolean(); if (!readIsNull) { /* RESOLVE: Sanity check for right class */ value = in.readObject(); isNull = evaluateNull(); } else { restoreToNull(); } }