java.io

Class NotSerializableException

Implemented Interfaces:
Serializable

public class NotSerializableException
extends ObjectStreamException

Thrown when an instance is required to have a Serializable interface. The serialization runtime or the class of the instance can throw this exception. The argument should be the name of the class.
Since:
JDK1.1
See Also:
Serialized Form

Constructor Summary

NotSerializableException()
Constructs a NotSerializableException object.
NotSerializableException(String classname)
Constructs a NotSerializableException object with message string.

Method Summary

Methods inherited from class java.lang.Throwable

fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Details

NotSerializableException

public NotSerializableException()
Constructs a NotSerializableException object.
Usages and Demos :

View More Examples of NotSerializableException()
   1:     throws IOException {
   2:         throw new NotSerializableException();
   3:     }
   4:         ...
   5:     throws IOException {
   6:         throw new NotSerializableException();
   7:     }
   8: 
   9: }

View Full Code Here
   1:         {
   2:             throw new NotSerializableException();
   3:         }
   4: 
   5:         ByteBuffer buf = ByteBuffer.allocate( LSDConstants.BLOCKSIZE );

View Full Code Here
   1:     throws IOException {
   2:     throw new NotSerializableException();
   3:     }
   4:         ...
   5:     throws IOException, ClassNotFoundException {
   6:     throw new NotSerializableException();
   7:     }
   8:         ...
   9:     throws IOException {
  10:     throw new NotSerializableException();
  11:     }

View Full Code Here
   1:                     if (_theXAResource == null)
   2:                         throw new NotSerializableException();
   3: 
   4:                     o.writeObject(_theXAResource);
   5:                     o.close();

View Full Code Here

NotSerializableException

public NotSerializableException(String classname)
Constructs a NotSerializableException object with message string.
Parameters:
classname - Class of the instance being serialized/deserialized.
Usages and Demos :

View More Examples of NotSerializableException(String classname)
   1:         } catch (NoSuchFieldException nsfe) {
   2:         throw new NotSerializableException(nsfe.getMessage());
   3:         }
   4:     }
   5:     }

View Full Code Here
   1:     } catch (NoSuchFieldException nsfe) {
   2:       throw new NotSerializableException(nsfe.getMessage());
   3:     }
   4:   }
   5:   

View Full Code Here
   1:         } catch (NoSuchFieldException nsfe) {
   2:         throw new NotSerializableException(nsfe.getMessage());
   3:         }
   4:     }
   5:     }

View Full Code Here
   1:     if(identity == null || data == null) throw new IllegalArgumentException("identity and data can not be null.");
   2:     if(!(data instanceof Serializable)) throw new NotSerializableException(data.getClass().getName() + " must implement java.io.Serializable");
   3:     String filename = identity.toString();
   4:     if(filename.indexOf(':') >= 0){
   5:       throw new IOException("can not doCreate file \"" + filename + "\" to store object " + data.toString());

View Full Code Here
   1:         } catch (NoSuchFieldException nsfe) {
   2:         throw new NotSerializableException(nsfe.getMessage());
   3:         }
   4:     }
   5:     }

View Full Code Here