public static Object deserializeObject(final byte[] objectBytes) throws IOException, ClassNotFoundException {
        final ByteArrayInputStream inputStream = new ByteArrayInputStream(objectBytes);
        final ObjectInputStream in = new ObjectInputStream(inputStream);
        final Object object = in.readObject();
        in.close();
        return object;
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/Serializer.java