core/src/main/java/com/orientechnologies/orient/core/serialization/serializer/string/OStringSerializerAnyStreamable.java
public Object fromStream(final String iStream) {
    if (iStream == null || iStream.length() == 0)
      // NULL VALUE
      return null;

    OSerializableStream instance = null;

    int propertyPos = iStream.indexOf(':');
    int pos = iStream.indexOf(OStringSerializerEmbedded.SEPARATOR);
    if (pos < 0 || propertyPos > -1 && pos > propertyPos) {
      instance = new ODocument();
      pos = -1;
    } else {
      final String className = iStream.substring(0, pos);
      try {
        final Class<?> clazz = Class.forName(className);
        instance = (OSerializableStream) clazz.newInstance();
      } catch (Exception e) {
        final String message = "Error on unmarshalling content. Class: " + className;
        OLogManager.instance().error(this, message, e);
        throw OException.wrapException(new OSerializationException(message), e);
      }
    }

    instance.fromStream(Base64.getDecoder().decode(iStream.substring(pos + 1)));
    return instance;
  }
public Object fromStream(final String iStream) {
    if (iStream == null || iStream.length() == 0)
      // NULL VALUE
      return null;

    OSerializableStream instance = null;

    int propertyPos = iStream.indexOf(':');
    int pos = iStream.indexOf(OStringSerializerEmbedded.SEPARATOR);
    if (pos < 0 || propertyPos > -1 && pos > propertyPos) {
      instance = new ODocument();
      pos = -1;
    } else {
      final String className = iStream.substring(0, pos);
      try {
        final Class<?> clazz = Class.forName(className);
        instance = (OSerializableStream) clazz.newInstance();
      } catch (Exception e) {
        final String message = "Error on unmarshalling content. Class: " + className;
        OLogManager.instance().error(this, message, e);
        throw OException.wrapException(new OSerializationException(message), e);
      }
    }

    instance.fromStream(Base64.getDecoder().decode(iStream.substring(pos + 1)));
    return instance;
  }
public Object fromStream ( final String iStream ) { if ( iStream == null || iStream . length ( ) == 0 ) // NULL VALUE
 return null ; OSerializableStream instance = null ; int propertyPos = iStream . indexOf ( ' ' ) ; int pos = iStream . indexOf ( OStringSerializerEmbedded . SEPARATOR ) ; if ( pos < 0 || propertyPos > - 1 && pos > propertyPos ) { instance = new ODocument ( ) ; pos = - 1 ; } else { final String className = iStream . substring ( 0 , pos ) ; try { final Class < ? > clazz = Class . forName ( className ) ; instance = ( OSerializableStream ) clazz . newInstance ( ) ; } catch ( Exception e ) { final String message = "Error on unmarshalling content. Class: " + className ; OLogManager . instance ( ) . error ( this , message , e ) ; throw OException . wrapException ( new OSerializationException ( message ) , e ) ; } } instance . fromStream ( Base64 . getDecoder ( ) . decode ( iStream . substring ( pos + 1 ) ) ) ; return instance ; }
Re-Create any object if the class has a public constructor that accepts a String as unique parameter.
Re - Create any object if the class has a public constructor that accepts a String as unique parameter .