List of utility methods to do Object Deserialize
T | deserializeFromBytes(byte[] serializedObject) deserialize From Bytes try { ByteArrayInputStream bais = new ByteArrayInputStream(serializedObject); ObjectInputStream ois = new ObjectInputStream(bais); return (T) ois.readObject(); } catch (IOException e) { throw new IllegalStateException(e); } catch (ClassNotFoundException e) { throw new IllegalStateException(e); ... |
Object | deserializeObject(byte[] buf) deserialize Object try (ObjectInputStream inStream = new ObjectInputStream(new ByteArrayInputStream(buf))) { return inStream.readObject(); |
Object | deserializeObject(byte[] bytes) deserialize Object ByteArrayInputStream is = new ByteArrayInputStream(bytes); try { ObjectInputStream ois = new ObjectInputStream(is); try { return ois.readObject(); } finally { ois.close(); } finally { is.close(); |
T | deserializeObject(byte[] bytes) Deserialize an object that had been serialized via #serializeObject(Object) . try (ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bytes))) { return (T) ois.readObject(); |
T | deserializeObject(byte[] bytes) deserialize Object ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(bytes); try { ObjectInputStream objectInputStream = new ObjectInputStream(byteArrayInputStream); return (T) objectInputStream.readObject(); } catch (IOException e) { e.printStackTrace(); } catch (ClassNotFoundException e) { e.printStackTrace(); ... |
Serializable | deserializeObject(byte[] bytes) Deserializes an object instance. Serializable obj = null; try { ObjectInputStream stream = new ObjectInputStream(new ByteArrayInputStream(bytes)); obj = (Serializable) stream.readObject(); stream.close(); } catch (IOException | ClassNotFoundException e0) { throw new RuntimeException(e0); return obj; |
Object | deserializeObject(byte[] bytes) deserialize the compress bytes if ((bytes == null) || (bytes.length == 0)) { return null; ByteArrayInputStream inbytes = new ByteArrayInputStream(bytes); InflaterInputStream inflating = new InflaterInputStream(inbytes); ObjectInputStream in = new ObjectInputStream(inflating); Object deserializedObject = in.readObject(); in.close(); ... |
Object | deserializeObject(byte[] data) Deserialize a byte array, ready to cast ByteArrayInputStream bais = new ByteArrayInputStream(data); Object o = null; try { ObjectInputStream oin = new ObjectInputStream(bais); o = oin.readObject(); } catch (IOException | ClassNotFoundException e) { e.printStackTrace(); return o; |
Object | deSerializeObject(byte[] data) de Serialize Object ByteArrayInputStream bis = null; ObjectInputStream ois = null; if (data == null || data.length == 0) { return null; try { bis = new ByteArrayInputStream(data); ois = new ObjectInputStream(bis); ... |
Object | deserializeObject(byte[] data) deserialize Object try { ByteArrayInputStream bais = new ByteArrayInputStream(data); BufferedInputStream bis = new BufferedInputStream(bais); ObjectInputStream ois = new ObjectInputStream(bis); Object result = ois.readObject(); ois.close(); return result; } catch (EOFException e) { ... |