/** * Used with serialization. Not to be called manually. * * @param in ObjectInput * @throws IOException * @throws ClassNotFoundException */ @Override public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException { setX(in.readDouble()); setY(in.readDouble()); setZ(in.readDouble()); setW(in.readDouble()); }
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { name = (String) in.readObject(); measurements = in.readLong(); min = in.readDouble(); max = in.readDouble(); total = in.readDouble(); childs = (Map) in.readObject(); }
/* */ public Object read(ObjectInput objIn) throws IOException { /* 137 */ return new FixedWeightEditDistance( objIn.readDouble(), objIn.readDouble(), objIn.readDouble(), objIn.readDouble(), objIn.readDouble()); /* */ }
@Override public void readExternal(ObjectInput objectInput) throws IOException { itemPriceId = objectInput.readLong(); itemId = objectInput.readLong(); minQuantity = objectInput.readInt(); maxQuantity = objectInput.readInt(); price = objectInput.readDouble(); discount = objectInput.readDouble(); taxable = objectInput.readBoolean(); shipping = objectInput.readDouble(); useShippingFormula = objectInput.readBoolean(); status = objectInput.readInt(); }
/** * The object implements the readExternal method to restore its contents by calling the methods of * DataInput for primitive types and readObject for objects, strings and arrays. The readExternal * method must read the values in the same sequence and with the same types as were written by * writeExternal. * * @param in the stream to read data from in order to restore the object * @throws java.io.IOException if I/O errors occur * @throws ClassNotFoundException If the class for an object being restored cannot be found. */ @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { int dim = in.readInt(); min = new double[dim]; max = new double[dim]; for (int i = 0; i < min.length; i++) { min[i] = in.readDouble(); } for (int i = 0; i < max.length; i++) { max[i] = in.readDouble(); } }
static void readSlotWithFields( short fieldsKey[], ClassMetaDataSlot slot, ObjectInput input, Object obj) throws IOException, ClassNotFoundException { short numberOfFields = (short) fieldsKey.length; for (short i = 0; i < numberOfFields; i++) { ClassMetadataField field = slot.getFields()[fieldsKey[i]]; if (field.getField().getType() == Integer.TYPE) { FieldsManager.getFieldsManager().setInt(obj, field, input.readInt()); } else if (field.getField().getType() == Byte.TYPE) { FieldsManager.getFieldsManager().setByte(obj, field, input.readByte()); } else if (field.getField().getType() == Long.TYPE) { FieldsManager.getFieldsManager().setLong(obj, field, input.readLong()); } else if (field.getField().getType() == Float.TYPE) { FieldsManager.getFieldsManager().setFloat(obj, field, input.readFloat()); } else if (field.getField().getType() == Double.TYPE) { FieldsManager.getFieldsManager().setDouble(obj, field, input.readDouble()); } else if (field.getField().getType() == Short.TYPE) { FieldsManager.getFieldsManager().setShort(obj, field, input.readShort()); } else if (field.getField().getType() == Character.TYPE) { FieldsManager.getFieldsManager().setCharacter(obj, field, input.readChar()); } else if (field.getField().getType() == Boolean.TYPE) { FieldsManager.getFieldsManager().setBoolean(obj, field, input.readBoolean()); } else { Object objTmp = input.readObject(); FieldsManager.getFieldsManager().setObject(obj, field, objTmp); } } }
/* (non-Javadoc) * @see imagej.data.roi.AbstractOverlay#readExternal(java.io.ObjectInput) */ @Override public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException { super.readExternal(in); final int nDimensions = in.readInt(); final double[] pt1 = new double[nDimensions]; final double[] pt2 = new double[nDimensions]; for (int i = 0; i < nDimensions; i++) { pt1[i] = in.readDouble(); } for (int i = 0; i < nDimensions; i++) { pt2[i] = in.readDouble(); } LineRegionOfInterest roi = getRegionOfInterest(); roi.setPoint1(pt1); roi.setPoint1(pt2); }
/* */ public CompiledEstimator(ObjectInput in) /* */ throws ClassNotFoundException, IOException /* */ { /* 144 */ this.mTokenCategorizer = ((TokenCategorizer) in.readObject()); /* */ /* 146 */ this.mTagSymbolTable = ((SymbolTable) in.readObject()); /* 147 */ this.mTokenSymbolTable = ((SymbolTable) in.readObject()); /* */ /* 150 */ this.mTagTrie = new EstimatorTrie(in); /* 151 */ this.mTokenTrie = new EstimatorTrie(in); /* 152 */ this.mLogUniformVocabEstimate = in.readDouble(); /* */ /* 154 */ int numSymbols = this.mTagSymbolTable.numSymbols(); /* 155 */ this.mConvertToInterior = new int[numSymbols]; /* 156 */ this.mCannotFollow = new boolean[numSymbols][numSymbols]; /* 157 */ int numTags = this.mTagSymbolTable.numSymbols(); /* 158 */ List starts = new ArrayList(); /* 159 */ List interiors = new ArrayList(); /* 160 */ for (int tagID = 0; tagID < numTags; tagID++) { /* 161 */ String tag = idToTag(tagID); /* 162 */ this.mConvertToInterior[tagID] = tagToInteriorID(tag); /* 163 */ if (tagID != this.mConvertToInterior[tagID]) { /* 164 */ interiors.add(Integer.valueOf(this.mConvertToInterior[tagID])); /* 165 */ starts.add(Integer.valueOf(tagID)); /* */ } /* 167 */ for (int tagMinus1ID = 0; tagMinus1ID < numTags; tagMinus1ID++) { /* 168 */ this.mCannotFollow[tagID][tagMinus1ID] = Tags.illegalSequence(idToTag(tagMinus1ID), tag); /* */ } /* */ } /* 171 */ this.mStart = convertToIntArray(starts); /* 172 */ this.mInterior = convertToIntArray(interiors); /* */ }
public void readExternal(ObjectInput objectInput) throws IOException { uuid = objectInput.readUTF(); pageId = objectInput.readLong(); resourcePrimKey = objectInput.readLong(); groupId = objectInput.readLong(); companyId = objectInput.readLong(); userId = objectInput.readLong(); userName = objectInput.readUTF(); createDate = objectInput.readLong(); modifiedDate = objectInput.readLong(); nodeId = objectInput.readLong(); title = objectInput.readUTF(); version = objectInput.readDouble(); minorEdit = objectInput.readBoolean(); content = objectInput.readUTF(); summary = objectInput.readUTF(); format = objectInput.readUTF(); head = objectInput.readBoolean(); parentTitle = objectInput.readUTF(); redirectTitle = objectInput.readUTF(); status = objectInput.readInt(); statusByUserId = objectInput.readLong(); statusByUserName = objectInput.readUTF(); statusDate = objectInput.readLong(); }
/** * Read the base state of the instance. This method does <strong>neither</strong> set the * interpolated time nor state. It is up to the derived class to reset it properly calling the * {@link #setInterpolatedTime} method later, once all rest of the object state has been set up * properly. * * @param in stream where to read the state from * @return interpolated time be set later by the caller * @exception IOException in case of read error */ protected double readBaseExternal(final ObjectInput in) throws IOException { final int dimension = in.readInt(); globalPreviousTime = in.readDouble(); globalCurrentTime = in.readDouble(); softPreviousTime = in.readDouble(); softCurrentTime = in.readDouble(); h = in.readDouble(); forward = in.readBoolean(); dirtyState = true; if (dimension < 0) { currentState = null; } else { currentState = new double[dimension]; for (int i = 0; i < currentState.length; ++i) { currentState[i] = in.readDouble(); } } // we do NOT handle the interpolated time and state here interpolatedTime = Double.NaN; interpolatedState = (dimension < 0) ? null : new double[dimension]; interpolatedDerivatives = (dimension < 0) ? null : new double[dimension]; finalized = true; return in.readDouble(); }
/** * Read this X-Y series from the given object input stream. * * @param in Object input stream. * @exception IOException Thrown if an I/O error occurred. */ public void readExternal(ObjectInput in) throws IOException { int n = in.readInt(); xarray = new double[n]; yarray = new double[n]; for (int i = 0; i < n; ++i) { xarray[i] = in.readDouble(); yarray[i] = in.readDouble(); } }
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { index = in.readInt(); type = in.readByte(); ovalue = in.readObject(); lvalue = in.readLong(); bvalue = in.readBoolean(); dvalue = in.readDouble(); isNull = in.readBoolean(); hashCode = in.readInt(); }
@Override public void readExternal(ObjectInput objectInput) throws IOException { articleImageId = objectInput.readLong(); groupId = objectInput.readLong(); articleId = objectInput.readUTF(); version = objectInput.readDouble(); elInstanceId = objectInput.readUTF(); elName = objectInput.readUTF(); languageId = objectInput.readUTF(); tempImage = objectInput.readBoolean(); }
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { rows = in.readInt(); columns = in.readInt(); self = new double[rows * columns]; for (int i = 0; i < rows * columns; i++) { self[i] = in.readDouble(); } }
/** {@inheritDoc} */ public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { // VERSION in.readByte(); // SUPER super.readExternal(in); // NO_ENTRY_KEY no_entry_key = in.readFloat(); // NO_ENTRY_VALUE no_entry_value = in.readDouble(); }
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { length = in.readInt(); cardinality = in.readInt(); int alignedSize = align(length, cardinality); values = new double[alignedSize]; indices = new int[alignedSize]; for (int i = 0; i < cardinality; i++) { indices[i] = in.readInt(); values[i] = in.readDouble(); } }
public void readExternal(ObjectInput objectInput) throws IOException { meetupsEntryId = objectInput.readLong(); companyId = objectInput.readLong(); userId = objectInput.readLong(); userName = objectInput.readUTF(); createDate = objectInput.readLong(); modifiedDate = objectInput.readLong(); title = objectInput.readUTF(); description = objectInput.readUTF(); startDate = objectInput.readLong(); endDate = objectInput.readLong(); totalAttendees = objectInput.readInt(); maxAttendees = objectInput.readInt(); price = objectInput.readDouble(); thumbnailId = objectInput.readLong(); }
/** {@inheritDoc} */ public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { // VERSION in.readByte(); // SUPER super.readExternal(in); // NUMBER OF ENTRIES int size = in.readInt(); setUp(size); // ENTRIES while (size-- > 0) { double key = in.readDouble(); int val = in.readInt(); put(key, val); } }
@Override protected Object readObject(ObjectInput in) throws IOException { return new Double(in.readDouble()); }
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { squareSize = in.readDouble(); }
/** * Calls the super method and reads the knn distance of this entry from the specified input * stream. */ @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { super.readExternal(in); this.knnDistance = in.readDouble(); }
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { real = in.readDouble(); imag = in.readDouble(); }
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { _0 = in.readDouble(); _1 = in.readDouble(); _2 = in.readDouble(); }
@Override public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException { super.readExternal(in); final GeneralPathRegionOfInterest roi = getRegionOfInterest(); roi.reset(); for (; ; ) { char type = in.readChar(); switch (type) { case 'M': roi.moveTo(in.readDouble(), in.readDouble()); break; case 'L': roi.lineTo(in.readDouble(), in.readDouble()); break; case 'Q': roi.quadTo(in.readDouble(), in.readDouble(), in.readDouble(), in.readDouble()); break; case 'C': roi.cubicTo( in.readDouble(), in.readDouble(), in.readDouble(), in.readDouble(), in.readDouble(), in.readDouble()); break; case ')': roi.close(); break; case '.': break; } } }
/** * Read this point from the given object input stream. * * @param in Object input stream. * @exception IOException Thrown if an I/O error occurred. */ public void readExternal(ObjectInput in) throws IOException { this.x = in.readDouble(); this.y = in.readDouble(); }