private void writeObject(ObjectOutputStream oos) throws IOException { Channel target = Channel.current(); if(channel!=null && channel!=target) throw new IllegalStateException("Can't send a remote FilePath to a different remote channel"); oos.defaultWriteObject(); oos.writeBoolean(channel==null); }
/** * This is to fix bugzilla bug 22438 * If the user defined class implements URIResolver and Serializable * then we want it to get serialized */ private void writeObject(ObjectOutputStream os) throws IOException, ClassNotFoundException { os.defaultWriteObject(); if (_uriResolver instanceof Serializable) { os.writeBoolean(true); os.writeObject((Serializable) _uriResolver); } else { os.writeBoolean(false); } }
private void writeObject(ObjectOutputStream out) throws IOException { loseWeight(); out.writeInt(size); out.writeObject(data); out.writeInt(linearExpandFactor); out.writeBoolean(exponentialExpanding); out.writeDouble(exponentialExpandFactor); }
/** * Override writeObject which is used in serialization. This class is serialized when JMX client * acquires MBeanInfo for ConfigurationParameter MBean. Super class is not serializable. */ private void writeObject(java.io.ObjectOutputStream out) throws IOException { out.writeObject(this.name); out.writeObject(this.description); out.writeObject(this.value); out.writeObject(this.type); out.writeBoolean(this.userModifiable); }
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"); } } }
private void writeObject(ObjectOutputStream out) throws IOException { out.defaultWriteObject(); out.writeObject(cookie.name()); out.writeObject(cookie.value()); out.writeLong(cookie.expiresAt()); out.writeObject(cookie.domain()); out.writeObject(cookie.path()); out.writeBoolean(cookie.secure()); out.writeBoolean(cookie.httpOnly()); out.writeBoolean(cookie.hostOnly()); out.writeBoolean(cookie.persistent()); }
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); }
@Override public void close() throws IOException { try (ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(new File(directory, JOURNAL_FILENAME)))) { oos.writeBoolean(true); Map<TransactionId, SerializableEntry<K>> toSerialize = new HashMap<>(); for (Map.Entry<TransactionId, Entry<K>> entry : states.entrySet()) { TransactionId key = entry.getKey(); Entry<K> value = entry.getValue(); toSerialize.put(key, new SerializableEntry<>(value, keySerializer)); } oos.writeObject(toSerialize); states.clear(); } } }
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(java.io.ObjectOutputStream s) throws java.io.IOException { s.defaultWriteObject(); for (int i = 0; i < size; i++) s.writeBoolean(a[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); }
/** * Serialization write support. * <p/> * NOTE: Don't forget to change the serialVersionUID constant at the top of this class * if you make any backwards-incompatible serialization changes!!! * (use the JDK 'serialver' program for this) * * @param out output stream provided by Java serialization * @throws IOException if there is a stream error */ private void writeObject(ObjectOutputStream out) throws IOException { out.defaultWriteObject(); boolean principalsExist = !CollectionUtils.isEmpty(realmPrincipals); out.writeBoolean(principalsExist); if (principalsExist) { out.writeObject(realmPrincipals); } }
out.writeBoolean(false); out.writeObject(clazz); } else { out.writeBoolean(true); out.writeInt(primitiveType);
ObjectOutputStream out = new ObjectOutputStream(outs); if (err != null) { out.writeBoolean(false); out.writeUTF(err.toString()); out.writeBoolean(true); out.writeObject(rvalue);
private void writeObject(ObjectOutputStream out) throws IOException { out.defaultWriteObject(); Address address = member.getAddress(); String host = address.getHost(); int port = address.getPort(); out.writeUTF(member.getUuid()); out.writeUTF(host); out.writeInt(port); out.writeBoolean(member.isLiteMember()); out.writeObject(member.getVersion()); }
private void writeObject(final ObjectOutputStream out) throws IOException { // write all the non-transient fields out.defaultWriteObject(); // write the non-serializable default value field if (defaultValue == null) { // we don't have a default value out.writeBoolean(false); } else { // we have a default value out.writeBoolean(true); byte[] serializedDefaultValue; try (ByteArrayOutputStream baos = new ByteArrayOutputStream(); DataOutputViewStreamWrapper outView = new DataOutputViewStreamWrapper(baos)) { TypeSerializer<T> duplicateSerializer = serializer.duplicate(); duplicateSerializer.serialize(defaultValue, outView); outView.flush(); serializedDefaultValue = baos.toByteArray(); } catch (Exception e) { throw new IOException("Unable to serialize default value of type " + defaultValue.getClass().getSimpleName() + ".", e); } out.writeInt(serializedDefaultValue.length); out.write(serializedDefaultValue); } }
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.writeBoolean(value[i]); } } private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {