List of utility methods to do InputStream Deserialize to Object
Object | deserialize(InputStream in) Deserialize from input stream ObjectInputStream is = new ObjectInputStream(in); return is.readObject(); |
Object | deserialize(InputStream in) deserialize ObjectInputStream oin = new ObjectInputStream(in); try { return (oin.readObject()); } catch (ClassNotFoundException e) { return (null); |
Object | deserialize(InputStream in, Class cls) Deserializes the object contained in the given input stream. if (cls == null) throw new NullPointerException("cls"); Object obj = deserialize(in, cls); if (!cls.isInstance(obj)) { throw new InvalidObjectException("type of deserialized instance not of required class."); return obj; |
T | deserialize(InputStream inputStream) deserialize if (inputStream == null) return null; ObjectInputStream ois = new ObjectInputStream(inputStream); return (T) ois.readObject(); |
Object | deserialize(InputStream inputStream) deserialize ObjectInputStream in = null; try { in = new ObjectInputStream(inputStream); return in.readObject(); } catch (ClassNotFoundException ex) { throw ex; } catch (IOException ex) { throw ex; ... |
Object | deserialize(InputStream inputStream) Deserializes an The stream will be closed once the object is written. if (inputStream == null) { throw new IllegalArgumentException("The InputStream must not be null"); ObjectInputStream in = null; try { in = new ObjectInputStream(inputStream); return in.readObject(); } catch (ClassNotFoundException ex) { ... |
Serializable | deserialize(InputStream is) Method description try { ObjectInputStream oip = new ObjectInputStream(is); return (Serializable) oip.readObject(); } catch (IOException e) { throw new IllegalArgumentException(e); } catch (ClassNotFoundException e) { throw new IllegalArgumentException(e); |
T | deserialize(InputStream is) deserialize ObjectInputStream in = new ObjectInputStream(is); @SuppressWarnings("unchecked") T e = (T) in.readObject(); in.close(); return e; |
T | deserialize(InputStream sourceInputStream, Class deserialize ObjectInputStream tais = null; try { tais = new ObjectInputStream(sourceInputStream); T result = (T) tais.readObject(); return result; } catch (Exception e) { throw new IllegalStateException(e); } finally { ... |
Object | deserialize(ObjectInputStream stream) deserialize if (stream == null) { return null; try { return stream.readObject(); } catch (IOException e) { throw new IllegalArgumentException("Could not deserialize object", e); } catch (ClassNotFoundException e) { ... |