List of utility methods to do Object Deserialize
Object | deserialize(byte[] data) Deserializes an object previously written using an ObjectOutputStream. if (data.length == 0) { return null; return deserialize(new BufferedInputStream(new ByteArrayInputStream(data))); |
Object | deserialize(byte[] data) deserialize try (ByteArrayInputStream buffer = new ByteArrayInputStream(data)) { try (ObjectInputStream input = new ObjectInputStream(buffer)) { return input.readObject(); } catch (Exception e) { throw new RuntimeException(e); |
T | deserialize(byte[] data) deserialize ByteArrayInputStream bis = new ByteArrayInputStream(data); ObjectInput in = null; Object result = null; try { in = new ObjectInputStream(bis); result = in.readObject(); if (!(result instanceof Serializable)) throw new RuntimeException("Object not of type Serializable"); ... |
Object | deserialize(byte[] data) Deserializes a packet. ByteArrayInputStream in = new ByteArrayInputStream(data); ObjectInputStream is = new ObjectInputStream(in); return is.readObject(); |
Object | deserialize(byte[] data) deserialize ByteArrayInputStream in = new ByteArrayInputStream(data); ObjectInputStream is = null; try { is = new ObjectInputStream(in); return is.readObject(); } catch (IOException e) { e.printStackTrace(); } catch (ClassNotFoundException e) { ... |
List | deserialize(byte[] features) Deserialize byte array to object List ByteArrayInputStream bis = new ByteArrayInputStream(features); ObjectInput in = new ObjectInputStream(bis); List<Double> result = (List<Double>) in.readObject(); in.close(); return result; |
Object | deserialize(byte[] in) deserialize return deserialize(in, Object.class); |
Object | deserialize(byte[] in) deserialize Object rv = null; try { if (in != null) { ByteArrayInputStream bis = new ByteArrayInputStream(in); ObjectInputStream is = new ObjectInputStream(bis); rv = is.readObject(); is.close(); bis.close(); ... |
Object | Deserialize(byte[] objectBytes) Deserialize a object ByteArrayInputStream byteStream; ObjectInput input; Object object; byteStream = new ByteArrayInputStream(objectBytes); input = new ObjectInputStream(byteStream); object = input.readObject(); input.close(); return object; ... |
Object | deserialize(byte[] objectData) Deserializes a single object from an array of bytes. Object object = null; if (objectData != null) { ObjectInputStream in = null; ByteArrayInputStream bin = new ByteArrayInputStream(objectData); BufferedInputStream bufin = new BufferedInputStream(bin); try { in = new ObjectInputStream(bufin); object = in.readObject(); ... |