Java Utililty Methods Is Serializable Object

List of utility methods to do Is Serializable Object

Description

The list of methods to do Is Serializable Object are organized into topic(s).

Method

booleanisSerializable(Class c)
Returns true if a class implements Serializable and false otherwise.
return (Serializable.class.isAssignableFrom(c));
booleanisSerializable(Class clazz)
is Serializable
return Serializable.class.isAssignableFrom(clazz);
booleanisSerializable(Class clazz)
Checks if is serializable.
while (Serializable.class.isAssignableFrom(clazz)) {
    clazz = clazz.getSuperclass();
    if (clazz == Object.class) {
        return true;
return false;
booleanisSerializable(final Object c)
is Serializable
return isSerializable(c.getClass());
booleanisSerializable(Object o)
is Serializable
if (!(o instanceof Serializable)) {
    return false;
try {
    new ObjectOutputStream(new ByteArrayOutputStream()).writeObject(o);
    return true;
} catch (NotSerializableException nse) {
    return false;
...
booleanisSerializable(Object o)
is Serializable
ObjectOutputStream oos = null;
try {
    oos = new ObjectOutputStream(new ByteArrayOutputStream());
    oos.writeObject(o);
    return true;
} catch (IOException e) {
    return false;
} finally {
...
booleanisSerializable(Object o)
is Serializable
try {
    testSerialization(o);
    return true;
} catch (NotSerializableException ex) {
    return false;
booleanisSerializable(Object o)
is Serializable
try {
    serializeObject(o);
} catch (IOException e) {
    return false;
return true;
booleanisSerializable(Object ob)
Checks if a given object is serializable.
if (!(ob instanceof Serializable)) {
    return false;
try {
    ob = serializeUnserialize(ob);
    return ob != null;
} catch (Exception e) {
    return false;
...
booleanisSerializable(Object obj)
This method tests if an object is serializable via the standard Java serialisation mechanism by attempting a serialisation
try {
    _serialisation_test_stream.writeObject(obj);
    return true;
} catch (Throwable e) {
    return false;