List of usage examples for java.io ObjectInput readLong
long readLong() throws IOException;
From source file:de.pro.dbw.file.dream.api.DreamModel.java
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { this.setId(in.readLong()); this.setGenerationTime(in.readLong()); this.setFavorite(in.readBoolean()); this.setFavoriteReason(String.valueOf(in.readObject())); this.setDescription(String.valueOf(in.readObject())); this.setText(String.valueOf(in.readObject())); this.setTitle(String.valueOf(in.readObject())); }
From source file:xbird.xquery.misc.BasicStringChunk.java
public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException { this._strPool = (List<String>) in.readObject(); this._cchunks = (char[][]) in.readObject(); this._cpointer = in.readLong(); }
From source file:com.delphix.session.impl.frame.SerialNumber.java
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { serialBits = in.readByte() & 0xff; // Unsigned byte if (serialBits < Byte.SIZE) { serialNumber = in.readByte();/*from ww w. j a v a 2s . c o m*/ } else if (serialBits < Short.SIZE) { serialNumber = in.readShort(); } else if (serialBits < Integer.SIZE) { serialNumber = in.readInt(); } else { serialNumber = in.readLong(); } }
From source file:gridool.db.partitioning.phihash.monetdb.MonetDBCsvLoadOperation.java
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { super.readExternal(in); this.tableName = IOUtils.readString(in); this.csvFileName = IOUtils.readString(in); this.createTableDDL = IOUtils.readString(in); this.copyIntoQuery = IOUtils.readString(in); this.expectedNumRecords = in.readLong(); this.alterTableDDL = IOUtils.readString(in); }
From source file:org.perf.log.logger.PerfLogData.java
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { setTransactionTime(in.readLong()); setGuid(readStr(in));/*ww w.j av a2 s . c o m*/ setSessionId(readStr(in)); setThreadName(readStr(in)); setThreadId(readStr(in)); setTransactionDate(new Date(in.readLong())); setServerName(readStr(in)); setServerIp(readStr(in)); setCloneName(readStr(in)); setJvmDepth(in.readInt()); setTxnFilterDepth(in.readInt()); setTransactionType(readStr(in)); setUserId(readStr(in)); setTransactionName(readStr(in)); setSubTransactionName(readStr(in)); setTransactionClass(readStr(in)); setInfoContextString(readStr(in)); setMessage(readStr(in)); setThrowableClassName(readStr(in)); setThrowableMessage(readStr(in)); // add any required PerfLogContext data }
From source file:com.eaio.util.text.HumanTime.java
/** * @see java.io.Externalizable#readExternal(java.io.ObjectInput) *///w w w . java 2s .co m public void readExternal(ObjectInput in) throws IOException { delta = in.readLong(); }
From source file:org.opencms.util.CmsUUID.java
/** * @see java.io.Externalizable#readExternal(java.io.ObjectInput) *//*from w w w.jav a2s .c o m*/ public void readExternal(ObjectInput in) { Object o = null; try { o = in.readObject(); } catch (Throwable e) { // there are 2 development version of OpenCms (6.1.7 and 6.1.8) which had a different format, // here the Object was preceded by a Long try { // first read the long, we don't really need it but it must be removed from the stream in.readLong(); o = in.readObject(); } catch (Throwable t) { if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_READ_UUID_OLD_1, o), t); } } } if (o instanceof String) { // this UUID has been serialized using the new method if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_READ_UUID_1, o)); } m_uuid = new UUID((String) o); } // log an error if the uuid could not be deserialized if (m_uuid == null) { // UUID cannot be deserialized if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_ERR_READ_UUID_0)); } } }
From source file:org.apache.openjpa.datacache.QueryKey.java
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { _candidateClassName = (String) in.readObject(); _subclasses = in.readBoolean();/*from w w w.j a va 2s.c om*/ _accessPathClassNames = (Set<String>) in.readObject(); _query = (String) in.readObject(); _ignoreChanges = in.readBoolean(); _params = (Map<Object, Object>) in.readObject(); _rangeStart = in.readLong(); _rangeEnd = in.readLong(); _timeout = in.readInt(); }
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:com.weibo.api.motan.protocol.rpc.CompressRpcCodec.java
/** * // w ww. jav a 2s. c o m * @param body * @param dataType * @param requestId * @param rpcProtocolVersion rpc?????????? * @param serialization * @return * @throws IOException * @throws ClassNotFoundException */ private Object decodeResponse(byte[] body, byte dataType, long requestId, byte rpcProtocolVersion, Serialization serialization) throws IOException, ClassNotFoundException { ObjectInput input = createInput(getInputStream(body)); long processTime = input.readLong(); DefaultResponse response = new DefaultResponse(); response.setRequestId(requestId); response.setProcessTime(processTime); if (dataType == MotanConstants.FLAG_RESPONSE_VOID) { return response; } String className = input.readUTF(); Class<?> clz = ReflectUtil.forName(className); Object result = deserialize((byte[]) input.readObject(), clz, serialization); if (dataType == MotanConstants.FLAG_RESPONSE) { response.setValue(result); } else if (dataType == MotanConstants.FLAG_RESPONSE_ATTACHMENT) { response.setValue(result); Map<String, String> attachment = decodeRequestAttachments(input); checkAttachment(attachment); } else if (dataType == MotanConstants.FLAG_RESPONSE_EXCEPTION) { response.setException((Exception) result); } else { throw new MotanFrameworkException("decode error: response dataType not support " + dataType, MotanErrorMsgConstant.FRAMEWORK_DECODE_ERROR); } response.setRequestId(requestId); input.close(); return response; }