Java Code Examples for java.io.NotSerializableException#initCause()
The following examples show how to use
java.io.NotSerializableException#initCause() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FunctionStreamingReplyMessage.java From gemfirexd-oss with Apache License 2.0 | 6 votes |
@Override public void fromData(DataInput in) throws IOException, ClassNotFoundException { super.fromData(in); this.msgNum = in.readInt(); this.processorId = in.readInt(); try { this.result = DataSerializer.readObject(in); byte flags = in.readByte(); this.lastMsg = (flags & IS_LAST) != 0; if ((flags & HAS_TX_CHANGES) != 0) { this.txChanges = TXChanges.fromData(in); } } catch (Exception e) { // bug fix 40670 // Seems odd to throw a NonSerializableEx when it has already been // serialized and we are failing because we can't deserialize. NotSerializableException ioEx = new NotSerializableException(); ioEx.initCause(e); throw ioEx; } }
Example 2
Source File: CertPath.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
/** * Replaces the {@code CertPath} to be serialized with a * {@code CertPathRep} object. * * @return the {@code CertPathRep} to be serialized * * @throws ObjectStreamException if a {@code CertPathRep} object * representing this certification path could not be created */ protected Object writeReplace() throws ObjectStreamException { try { return new CertPathRep(type, getEncoded()); } catch (CertificateException ce) { NotSerializableException nse = new NotSerializableException ("java.security.cert.CertPath: " + type); nse.initCause(ce); throw nse; } }
Example 3
Source File: CertPath.java From Java8CN with Apache License 2.0 | 5 votes |
/** * Replaces the {@code CertPath} to be serialized with a * {@code CertPathRep} object. * * @return the {@code CertPathRep} to be serialized * * @throws ObjectStreamException if a {@code CertPathRep} object * representing this certification path could not be created */ protected Object writeReplace() throws ObjectStreamException { try { return new CertPathRep(type, getEncoded()); } catch (CertificateException ce) { NotSerializableException nse = new NotSerializableException ("java.security.cert.CertPath: " + type); nse.initCause(ce); throw nse; } }
Example 4
Source File: CertPath.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Returns a {@code CertPath} constructed from the type and data. * * @return the resolved {@code CertPath} object * * @throws ObjectStreamException if a {@code CertPath} could not * be constructed */ protected Object readResolve() throws ObjectStreamException { try { CertificateFactory cf = CertificateFactory.getInstance(type); return cf.generateCertPath(new ByteArrayInputStream(data)); } catch (CertificateException ce) { NotSerializableException nse = new NotSerializableException ("java.security.cert.CertPath: " + type); nse.initCause(ce); throw nse; } }
Example 5
Source File: CertPath.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Replaces the {@code CertPath} to be serialized with a * {@code CertPathRep} object. * * @return the {@code CertPathRep} to be serialized * * @throws ObjectStreamException if a {@code CertPathRep} object * representing this certification path could not be created */ protected Object writeReplace() throws ObjectStreamException { try { return new CertPathRep(type, getEncoded()); } catch (CertificateException ce) { NotSerializableException nse = new NotSerializableException ("java.security.cert.CertPath: " + type); nse.initCause(ce); throw nse; } }
Example 6
Source File: CertPath.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * Returns a {@code CertPath} constructed from the type and data. * * @return the resolved {@code CertPath} object * * @throws ObjectStreamException if a {@code CertPath} could not * be constructed */ protected Object readResolve() throws ObjectStreamException { try { CertificateFactory cf = CertificateFactory.getInstance(type); return cf.generateCertPath(new ByteArrayInputStream(data)); } catch (CertificateException ce) { NotSerializableException nse = new NotSerializableException ("java.security.cert.CertPath: " + type); nse.initCause(ce); throw nse; } }
Example 7
Source File: CertPath.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
/** * Replaces the {@code CertPath} to be serialized with a * {@code CertPathRep} object. * * @return the {@code CertPathRep} to be serialized * * @throws ObjectStreamException if a {@code CertPathRep} object * representing this certification path could not be created */ protected Object writeReplace() throws ObjectStreamException { try { return new CertPathRep(type, getEncoded()); } catch (CertificateException ce) { NotSerializableException nse = new NotSerializableException ("java.security.cert.CertPath: " + type); nse.initCause(ce); throw nse; } }
Example 8
Source File: CertPath.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Returns a {@code CertPath} constructed from the type and data. * * @return the resolved {@code CertPath} object * * @throws ObjectStreamException if a {@code CertPath} could not * be constructed */ protected Object readResolve() throws ObjectStreamException { try { CertificateFactory cf = CertificateFactory.getInstance(type); return cf.generateCertPath(new ByteArrayInputStream(data)); } catch (CertificateException ce) { NotSerializableException nse = new NotSerializableException ("java.security.cert.CertPath: " + type); nse.initCause(ce); throw nse; } }
Example 9
Source File: CertPath.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Replaces the {@code CertPath} to be serialized with a * {@code CertPathRep} object. * * @return the {@code CertPathRep} to be serialized * * @throws ObjectStreamException if a {@code CertPathRep} object * representing this certification path could not be created */ protected Object writeReplace() throws ObjectStreamException { try { return new CertPathRep(type, getEncoded()); } catch (CertificateException ce) { NotSerializableException nse = new NotSerializableException ("java.security.cert.CertPath: " + type); nse.initCause(ce); throw nse; } }
Example 10
Source File: CertPath.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Returns a {@code CertPath} constructed from the type and data. * * @return the resolved {@code CertPath} object * * @throws ObjectStreamException if a {@code CertPath} could not * be constructed */ protected Object readResolve() throws ObjectStreamException { try { CertificateFactory cf = CertificateFactory.getInstance(type); return cf.generateCertPath(new ByteArrayInputStream(data)); } catch (CertificateException ce) { NotSerializableException nse = new NotSerializableException ("java.security.cert.CertPath: " + type); nse.initCause(ce); throw nse; } }
Example 11
Source File: CertPath.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
/** * Replaces the {@code CertPath} to be serialized with a * {@code CertPathRep} object. * * @return the {@code CertPathRep} to be serialized * * @throws ObjectStreamException if a {@code CertPathRep} object * representing this certification path could not be created */ protected Object writeReplace() throws ObjectStreamException { try { return new CertPathRep(type, getEncoded()); } catch (CertificateException ce) { NotSerializableException nse = new NotSerializableException ("java.security.cert.CertPath: " + type); nse.initCause(ce); throw nse; } }
Example 12
Source File: CertPath.java From jdk-1.7-annotated with Apache License 2.0 | 5 votes |
/** * Replaces the <code>CertPath</code> to be serialized with a * <code>CertPathRep</code> object. * * @return the <code>CertPathRep</code> to be serialized * * @throws ObjectStreamException if a <code>CertPathRep</code> object * representing this certification path could not be created */ protected Object writeReplace() throws ObjectStreamException { try { return new CertPathRep(type, getEncoded()); } catch (CertificateException ce) { NotSerializableException nse = new NotSerializableException ("java.security.cert.CertPath: " + type); nse.initCause(ce); throw nse; } }
Example 13
Source File: CertPath.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Replaces the {@code CertPath} to be serialized with a * {@code CertPathRep} object. * * @return the {@code CertPathRep} to be serialized * * @throws ObjectStreamException if a {@code CertPathRep} object * representing this certification path could not be created */ protected Object writeReplace() throws ObjectStreamException { try { return new CertPathRep(type, getEncoded()); } catch (CertificateException ce) { NotSerializableException nse = new NotSerializableException ("java.security.cert.CertPath: " + type); nse.initCause(ce); throw nse; } }
Example 14
Source File: CertPath.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Returns a {@code CertPath} constructed from the type and data. * * @return the resolved {@code CertPath} object * * @throws ObjectStreamException if a {@code CertPath} could not * be constructed */ protected Object readResolve() throws ObjectStreamException { try { CertificateFactory cf = CertificateFactory.getInstance(type); return cf.generateCertPath(new ByteArrayInputStream(data)); } catch (CertificateException ce) { NotSerializableException nse = new NotSerializableException ("java.security.cert.CertPath: " + type); nse.initCause(ce); throw nse; } }
Example 15
Source File: CertPath.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Replaces the {@code CertPath} to be serialized with a * {@code CertPathRep} object. * * @return the {@code CertPathRep} to be serialized * * @throws ObjectStreamException if a {@code CertPathRep} object * representing this certification path could not be created */ protected Object writeReplace() throws ObjectStreamException { try { return new CertPathRep(type, getEncoded()); } catch (CertificateException ce) { NotSerializableException nse = new NotSerializableException ("java.security.cert.CertPath: " + type); nse.initCause(ce); throw nse; } }
Example 16
Source File: CertPath.java From j2objc with Apache License 2.0 | 5 votes |
/** * Replaces the {@code CertPath} to be serialized with a * {@code CertPathRep} object. * * @return the {@code CertPathRep} to be serialized * * @throws ObjectStreamException if a {@code CertPathRep} object * representing this certification path could not be created */ protected Object writeReplace() throws ObjectStreamException { try { return new CertPathRep(type, getEncoded()); } catch (CertificateException ce) { NotSerializableException nse = new NotSerializableException ("java.security.cert.CertPath: " + type); nse.initCause(ce); throw nse; } }
Example 17
Source File: CertPath.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * Returns a {@code CertPath} constructed from the type and data. * * @return the resolved {@code CertPath} object * * @throws ObjectStreamException if a {@code CertPath} could not * be constructed */ protected Object readResolve() throws ObjectStreamException { try { CertificateFactory cf = CertificateFactory.getInstance(type); return cf.generateCertPath(new ByteArrayInputStream(data)); } catch (CertificateException ce) { NotSerializableException nse = new NotSerializableException ("java.security.cert.CertPath: " + type); nse.initCause(ce); throw nse; } }
Example 18
Source File: CertPath.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
/** * Returns a {@code CertPath} constructed from the type and data. * * @return the resolved {@code CertPath} object * * @throws ObjectStreamException if a {@code CertPath} could not * be constructed */ protected Object readResolve() throws ObjectStreamException { try { CertificateFactory cf = CertificateFactory.getInstance(type); return cf.generateCertPath(new ByteArrayInputStream(data)); } catch (CertificateException ce) { NotSerializableException nse = new NotSerializableException ("java.security.cert.CertPath: " + type); nse.initCause(ce); throw nse; } }
Example 19
Source File: FunctionStreamingReplyMessage.java From gemfirexd-oss with Apache License 2.0 | 5 votes |
@Override public void toData(DataOutput out) throws IOException { super.toData(out); byte flags = this.lastMsg ? IS_LAST : 0; out.writeInt(this.msgNum); out.writeInt(this.processorId); //soubhik. fix for ticket 40670 try { DataSerializer.writeObject(this.result, out); if (this.lastMsg) { super.finishTX(this.txMsg, this.sendTXChanges, true); } if (this.txChanges != null) { flags |= HAS_TX_CHANGES; } out.writeByte(flags); if (this.txChanges != null) { this.txChanges.toData(out); } } catch(Exception ex) { if (ex instanceof CancelException) { throw new DistributedSystemDisconnectedException(ex); } NotSerializableException ioEx = new NotSerializableException(this.result .getClass().getName()); ioEx.initCause(ex); throw ioEx; } }
Example 20
Source File: CertPath.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
/** * Returns a {@code CertPath} constructed from the type and data. * * @return the resolved {@code CertPath} object * * @throws ObjectStreamException if a {@code CertPath} could not * be constructed */ protected Object readResolve() throws ObjectStreamException { try { CertificateFactory cf = CertificateFactory.getInstance(type); return cf.generateCertPath(new ByteArrayInputStream(data)); } catch (CertificateException ce) { NotSerializableException nse = new NotSerializableException ("java.security.cert.CertPath: " + type); nse.initCause(ce); throw nse; } }