/** * The serial form currently mimics Android's java.util.HashSet version, e.g. see * http://omapzoom.org/?p=platform/libcore.git;a=blob;f=luni/src/main/java/java/util/HashSet.java */ private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); stream.writeInt(size); for (E e : this) { stream.writeObject(e); } }
/** * Serialize level. * @param s serialization stream. * @throws IOException if exception during serialization. */ private void writeObject(final ObjectOutputStream s) throws IOException { s.defaultWriteObject(); s.writeInt(level); s.writeInt(syslogEquivalent); s.writeUTF(levelStr); }
void writeMapTo(ObjectOutputStream out) throws IOException { out.writeInt(delegate.size()); for (Entry<K, V> entry : delegate.entrySet()) { out.writeObject(entry.getKey()); out.writeObject(entry.getValue()); } out.writeObject(null); // terminate entries }
/** * Write the map out using a custom routine. * @param out the output stream * @throws IOException */ protected void doWriteObject(ObjectOutputStream out) throws IOException { out.writeInt(map.size()); for (Iterator it = map.entrySet().iterator(); it.hasNext();) { Map.Entry entry = (Map.Entry) it.next(); out.writeObject(entry.getKey()); out.writeInt(((MutableInteger) entry.getValue()).value); } }
private void writeObject(ObjectOutputStream out) throws IOException { loseWeight(); out.writeInt(size); out.writeObject(data); out.writeInt(linearExpandFactor); out.writeBoolean(exponentialExpanding); out.writeDouble(exponentialExpandFactor); }
private void writeObject(ObjectOutputStream outputStream) throws IOException { outputStream.defaultWriteObject(); final Map<K, V> ro = readOnlySnapshot(); outputStream.writeBoolean(isReadOnly()); outputStream.writeInt(ro.size()); for (Entry<K, V> e : ro.entrySet()) { outputStream.writeObject(e.getKey()); outputStream.writeObject(e.getValue()); } } }
private void writeObject(java.io.ObjectOutputStream s) throws IOException { s.defaultWriteObject(); // Nothing to write final NBSI nbsi = _nbsi; // The One Field is transient final int len = _nbsi._bits.length<<6; s.writeInt(len); // Write max element for( int i=0; i<len; i++ ) s.writeBoolean( _nbsi.contains(i) ); }
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"); } } }
/** * Write the map out using a custom routine. * @param out the output stream * @throws IOException */ protected void doWriteObject(ObjectOutputStream out) throws IOException { out.writeInt(map.size()); for (Iterator it = map.entrySet().iterator(); it.hasNext();) { Map.Entry entry = (Map.Entry) it.next(); out.writeObject(entry.getKey()); out.writeInt(((MutableInteger) entry.getValue()).value); } }
/** * The serial form currently mimics Android's java.util.HashMap version, e.g. see * http://omapzoom.org/?p=platform/libcore.git;a=blob;f=luni/src/main/java/java/util/HashMap.java */ private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); stream.writeInt(size); for (int i = 0; i < size; i++) { stream.writeObject(keys[i]); stream.writeObject(values[i]); } }
/** * Stores the contents of a map in an output stream, as part of serialization. It does not support * concurrent maps whose content may change while the method is running. * * <p>The serialized output consists of the number of entries, first key, first value, second key, * second value, and so on. */ static <K, V> void writeMap(Map<K, V> map, ObjectOutputStream stream) throws IOException { stream.writeInt(map.size()); for (Map.Entry<K, V> entry : map.entrySet()) { stream.writeObject(entry.getKey()); stream.writeObject(entry.getValue()); } }
protected void writeBaseObject(ObjectOutputStream out) throws IOException { out.writeObject(serverName); out.writeObject(databaseName); out.writeObject(user); out.writeObject(password); out.writeInt(portNumber); out.writeInt(prepareThreshold); out.writeInt(unknownLength); out.writeInt(loginTimeout); out.writeInt(socketTimeout); out.writeBoolean(ssl); out.writeObject(sslfactory); out.writeBoolean(tcpKeepAlive); out.writeObject(compatible); out.writeInt(logLevel); out.writeInt(protocolVersion); out.writeObject(applicationName); }
private void writeObject(ObjectOutputStream outputStream) throws IOException { outputStream.defaultWriteObject(); final Map<K, V> ro = readOnlySnapshot(); outputStream.writeBoolean(isReadOnly()); outputStream.writeInt(ro.size()); for (Entry<K, V> e : ro.entrySet()) { outputStream.writeObject(e.getKey()); outputStream.writeObject(e.getValue()); } } }
/** * The serial form currently mimics Android's java.util.HashMap version, e.g. see * http://omapzoom.org/?p=platform/libcore.git;a=blob;f=luni/src/main/java/java/util/HashMap.java */ private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); stream.writeInt(size); for (int i = 0; i < size; i++) { stream.writeObject(keys[i]); stream.writeObject(values[i]); } }
private void writeObject(java.io.ObjectOutputStream s) throws IOException { s.defaultWriteObject(); // Nothing to write final NBSI nbsi = _nbsi; // The One Field is transient final int len = _nbsi._bits.length<<6; s.writeInt(len); // Write max element for( int i=0; i<len; i++ ) s.writeBoolean( _nbsi.contains(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(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); stream.writeInt(mappingsCount); Iterator<Map.Entry<K, V>> iterator = entrySet().iterator(); while (iterator.hasNext()) { Map.Entry<K, V> entry = iterator.next(); stream.writeObject(entry.getKey()); stream.writeObject(entry.getValue()); } }
/** * The serial form currently mimics Android's java.util.HashSet version, e.g. see * http://omapzoom.org/?p=platform/libcore.git;a=blob;f=luni/src/main/java/java/util/HashSet.java */ private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); stream.writeInt(size); for (E e : this) { stream.writeObject(e); } }
private void writeObject(ObjectOutputStream out) throws IOException { out.writeInt(size); out.writeObject(base); out.writeObject(check); }
out.writeBoolean(false); out.writeObject(clazz); } else { out.writeBoolean(true); out.writeInt(primitiveType);