private void writeObject(ObjectOutputStream s) throws IOException { s.defaultWriteObject(); s.writeLong(sum()); }
// never change this private static final long serialVersionUID = 3375159358757648792L; // only goes up private static final int INTERNAL_VERSION_ID = 2; ... // NOTE: in version #1, this was an int private long paws; private void readObject(java.io.ObjectInputStream in) { int version = in.readInt(); switch (version) { case 1 : paws = in.readInt(); ... case 2 : paws = in.readLong(); ... private void writeObject(java.io.ObjectOutputStream out) { out.writeInt(INTERNAL_VERSION_ID); out.writeLong(paws); ...
private void writeObject(java.io.ObjectOutputStream s) throws IOException { s.defaultWriteObject(); // Write nothing for( long K : keySet() ) { final Object V = get(K); // Do an official 'get' s.writeLong (K); // Write the <long,TypeV> pair s.writeObject(V); } s.writeLong(NO_KEY); // Sentinel to indicate end-of-data s.writeObject(null); }
private void writeObject(final ObjectOutputStream o) throws IOException { o.writeLong(configuredHighestToLowestValueRatio); o.writeDouble(currentLowestValueInAutoRange); o.writeObject(integerValuesHistogram); }
private void writeObject(final ObjectOutputStream out) throws IOException { out.defaultWriteObject(); out.writeInt(length()); out.writeObject(lengthRange()); out.writeLong(_min); out.writeLong(_max); for (LongGene gene : _genes) { out.writeLong(gene.getAllele()); } }
private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException { s.defaultWriteObject(); for (int i = 0; i < size; i++) { s.writeInt(key[i]); s.writeLong(value[i]); } } private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
private void writeObject(java.io.ObjectOutputStream s) throws IOException { s.defaultWriteObject(); // Write nothing for( long K : keySet() ) { final Object V = get(K); // Do an official 'get' s.writeLong (K); // Write the <long,TypeV> pair s.writeObject(V); } s.writeLong(NO_KEY); // Sentinel to indicate end-of-data s.writeObject(null); }
final ObjectOutputStream objOut = new JRMPClient.MarshalOutputStream(dos); objOut.writeLong(obj); objOut.writeInt(o1); objOut.writeLong(o2); objOut.writeShort(o3); objOut.writeInt(-1); objOut.writeLong(Util.computeMethodHash(ActivationInstantiator.class.getMethod("newInstance", ActivationID.class, ActivationDesc.class))); objOut.writeObject(object); os.flush(); ObjectPayload.Utils.releasePayload(payload, object);
public long writeHtmlTo(long start, Writer w) throws IOException { ConsoleAnnotationOutputStream<T> caw = new ConsoleAnnotationOutputStream<>( w, createAnnotator(Stapler.getCurrentRequest()), context, charset); long r = super.writeLogTo(start,caw); ByteArrayOutputStream baos = new ByteArrayOutputStream(); Cipher sym = PASSING_ANNOTATOR.encrypt(); ObjectOutputStream oos = AnonymousClassWarnings.checkingObjectOutputStream(new GZIPOutputStream(new CipherOutputStream(baos,sym))); oos.writeLong(System.currentTimeMillis()); // send timestamp to prevent a replay attack oos.writeObject(caw.getConsoleAnnotator()); oos.close(); StaplerResponse rsp = Stapler.getCurrentResponse(); if (rsp!=null) rsp.setHeader("X-ConsoleAnnotator", new String(Base64.encode(baos.toByteArray()))); return r; }
private void writeObject(ObjectOutputStream out) throws IOException { out.defaultWriteObject(); out.writeInt(keys.length); // the capacity out.writeInt(size); // number of entries for (int i=0; i<keys.length; i++) { Object val = values[i]; if (val == null || val == REMOVED) continue; out.writeLong(keys[i]); out.writeObject(unmaskNull(val)); } }
private void writeObject(ObjectOutputStream s) throws IOException { s.defaultWriteObject(); s.writeLong(sum()); }
private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException { s.defaultWriteObject(); s.writeInt(heap.length); for (int i = 0; i < size; i++) s.writeLong(heap[i]); }
private void writeObject(final ObjectOutputStream o) throws IOException { o.writeLong(lowestDiscernibleValue); o.writeLong(highestTrackableValue); o.writeInt(numberOfSignificantValueDigits); o.writeInt(getNormalizingIndexOffset()); o.writeDouble(integerToDoubleValueConversionRatio); o.writeLong(getTotalCount()); // Max Value is added to the serialized form because establishing max via scanning is "harder" during // deserialization, as the counts array is not available at the subclass deserializing level, and we don't // really want to have each subclass establish max on it's own... o.writeLong(maxValue); o.writeLong(minNonZeroValue); o.writeLong(startTimeStampMsec); o.writeLong(endTimeStampMsec); o.writeBoolean(autoResize); o.writeInt(wordSizeInBytes); }
private void writeObject(java.io.ObjectOutputStream s) throws IOException { s.defaultWriteObject(); // Write nothing for (long K : keySet()) { final Object V = get(K); // Do an official 'get' s.writeLong(K); // Write the <long,TypeV> pair s.writeObject(V); } s.writeLong(NO_KEY); // Sentinel to indicate end-of-data s.writeObject(null); }
private void writeObject(ObjectOutputStream out) throws IOException { out.writeObject(cookie.getName()); out.writeObject(cookie.getValue()); out.writeObject(cookie.getComment()); out.writeObject(cookie.getCommentURL()); out.writeObject(cookie.getDomain()); out.writeLong(cookie.getMaxAge()); out.writeObject(cookie.getPath()); out.writeObject(cookie.getPortlist()); out.writeInt(cookie.getVersion()); out.writeBoolean(cookie.getSecure()); out.writeBoolean(cookie.getDiscard()); }
private void writeObject(ObjectOutputStream out) throws IOException { out.writeObject(cookie.name()); out.writeObject(cookie.value()); out.writeLong(cookie.persistent() ? cookie.expiresAt() : NON_VALID_EXPIRES_AT); out.writeObject(cookie.domain()); out.writeObject(cookie.path()); out.writeBoolean(cookie.secure()); out.writeBoolean(cookie.httpOnly()); out.writeBoolean(cookie.hostOnly()); }
private void writeObject(ObjectOutputStream s) throws IOException { s.defaultWriteObject(); s.writeLong(sum()); }
private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException { s.defaultWriteObject(); for (int i = 0; i < size; i++) { s.writeLong(key[i]); s.writeInt(value[i]); } } private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
private void writeObject(ObjectOutputStream out) throws IOException { out.writeBoolean(projectName != null); // hasValue out.writeUTF(projectName == null ? "" : projectName); out.writeBoolean(tabSize != null); // hasValue out.writeInt(tabSize == null ? 0 : tabSize); out.writeBoolean(analyzerGuruVersion != null); // hasValue out.writeLong(analyzerGuruVersion == null ? 0 : analyzerGuruVersion); int analyzerCount = analyzersVersions.size(); out.writeInt(analyzerCount); for (Map.Entry<String, Long> entry : analyzersVersions.entrySet()) { out.writeUTF(entry.getKey()); out.writeLong(entry.getValue()); --analyzerCount; } if (analyzerCount != 0) { throw new IllegalStateException("analyzersVersions were modified"); } } }