Package flex.messaging.io.amf

Examples of flex.messaging.io.amf.Amf3Input.readObject()


  public <T> T fromAmf(final ByteArrayInputStream amf)
      throws ClassNotFoundException, IOException {
    Amf3Input amf3Input = new Amf3Input(context);
    amf3Input.setInputStream(amf);
    // Read object does the actual work of conversion.
    return (T) amf3Input.readObject();
  }

  public SerializationContext getContext() {
    return context;
  }
View Full Code Here


  {
    ASObject deSerializedObj = null;
 
    Amf3Input amf3Input = new Amf3Input(serializationContext);
    amf3Input.setInputStream(inputStream); // uncompress
    deSerializedObj = (ASObject) amf3Input.readObject();
    //amf3Input.close();

    return deSerializedObj;
  }
 
View Full Code Here

    AMFMapper mapper = AMFMapperIntrospector.getAMFMapper(realType, genericType);
    SerializationContext context = new SerializationContext();
    Amf3Input input = new Amf3Input(context);
    input.setInputStream(stream);
    try {
      return mapper.toJAXB(input.readObject(), new AMFMappingContext());
    }
    catch (ClassNotFoundException e) {
      throw new IOException("Invalid request: " + e.getMessage());
    }
  }
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.