Examples of OSerializationException


Examples of com.orientechnologies.orient.core.exception.OSerializationException

  public byte[] toStream(final ODatabaseRecord iDatabase, Object iObject) throws IOException {
    if (iObject == null)
      return null;

    if (((ORecord<?>) iObject).getIdentity() == null)
      throw new OSerializationException("Can't serialize record without identity. Store it before to serialize.");

    final StringBuilder buffer = OStreamSerializerHelper.writeRecordType(iObject.getClass(), new StringBuilder());
    buffer.append(((ORecord<?>) iObject).getIdentity().toString());

    return OBinaryProtocol.string2bytes(buffer.toString());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.