public Object deserialize(final Type manifest,final InputStream stream,final byte[] buffer) throws IOException {
  if (manifest instanceof Class<?>) {
    return deserialize((Class<?>)manifest,stream,buffer);
  }
  final JsonStreamReader json=new JsonStreamReader<TContext>(stream,buffer,context);
  json.getNextToken();
  if (json.wasNull()) {
    return null;
  }
  final Object result=deserializeWith(manifest,json);
  if (result != null)   return result;
  if (fallback != null) {
    return fallback.deserialize(context,manifest,json.streamFromStart());
  }
  throw new IOException("Unable to find reader for provided type: " + manifest + " and fallback serialization is not registered.\n"+ "Try initializing DslJson with custom fallback in case of unsupported objects or register specified type using registerReader into "+ getClass());
}

public Object deserialize ( final Type manifest , final InputStream stream , final byte [ ] buffer ) throws IOException { if ( manifest instanceof Class < ? > ) { return deserialize ( ( Class < ? > ) manifest , stream , buffer ) ; } final JsonStreamReader json = new JsonStreamReader < TContext > ( stream , buffer , context ) ; json . getNextToken ( ) ; if ( json . wasNull ( ) ) { return null ; } final Object result = deserializeWith ( manifest , json ) ; if ( result != null ) return result ; if ( fallback != null ) { return fallback . deserialize ( context , manifest , json . streamFromStart ( ) ) ; } throw new IOException ( "Unable to find reader for provided type: " + manifest + " and fallback serialization is not registered.\n" + "Try initializing DslJson with custom fallback in case of unsupported objects or register specified type using registerReader into " + getClass ( ) ) ; }
deserialize api for working with streams . deserialize provided stream input into target object . use buffer for internal conversion from stream into byte [ ] for partial processing . < p > since json is often though of as a series of char , most libraries will convert inputs into a sequence of chars and do processing on them . dsljson will treat input as a sequence of bytes which allows for various optimizations . < p > when working on inputstream dsljson will process json in chunks of byte [ ] inputs . provided buffer will be used as input for partial processing . < p > for best performance buffer should be reused .
