Examples of SerializationContext


Examples of buildcraft.core.network.serializers.SerializationContext

          + actuals.length);
    }

    data.writeShort(methodIndex);

    SerializationContext context = new SerializationContext();

    for (int i = 0; i < actuals.length; ++i) {
      if (!writePrimitive(data, formals[i], actuals[i])) {
        m.mappings[i].write(data, actuals[i], context);
      }
View Full Code Here

Examples of com.bubble.serializer.SerializationContext


 
  public void testBubbleSpeedSingle()  {
    Pojo pojo = new Pojo(TEST_VALUE);
    SerializationContext context = new SerializationContext();
    ByteBuffer buffer = ByteBuffer.allocate(1024);
    long startTime = System.currentTimeMillis();
    context.serialize(pojo, buffer);
    long endTime = System.currentTimeMillis();
    long delay = endTime-startTime;
    System.out.println("Bubble time: "+delay+"ms");
  }
View Full Code Here

Examples of com.getperka.flatpack.ext.SerializationContext

  protected <T> T testCodex(Provider<? extends Codex<T>> codexes, T value, Set<HasUuid> scanned) {
    // Just smoke-test the description
    assertNotNull(codexes.get().describe());

    StringWriter out = new StringWriter();
    SerializationContext serialization = serializationContext(out);
    try {
      Codex<T> codex = codexes.get();
      codexes.get().write(value, serialization);
      if (scanned != null) {
        visitors.getWalkers().walkImmutable(codex).accept(packScanners.get(), value);
        scanned.addAll(serialization.getEntities());
      }
    } finally {
      closeContext();
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.serializer.SerializationContext

  /**
   * Appends a Node to the command text as a constant using appropriate formatting
   * @param n Node to append
   */
  public void appendNode(Node n) {
    SerializationContext context = new SerializationContext(this.prefixes);
    context.setBaseIRI(this.baseUri);
    this.cmd.append(FmtUtils.stringForNode(n, context));
  }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.serializer.SerializationContext

  public String toString()
  {
    String command = this.cmd.toString();
   
    //First Inject Parameters
    SerializationContext context = new SerializationContext(this.prefixes);
    context.setBaseIRI(this.baseUri);
    Iterator<String> vars = this.params.keySet().iterator();
    while (vars.hasNext())
    {
      String var = vars.next();
     
View Full Code Here

Examples of com.hp.hpl.jena.sparql.serializer.SerializationContext

        output(outStream, query, op, lineNumbers) ;
    }
   
    private void output(ServletOutputStream outStream, Query query, final Op op, boolean lineNumbers) throws IOException
    {
        final SerializationContext sCxt = new SerializationContext(query) ;
        Content c = new Content(){
            @Override
            public void print(IndentedWriter out)
            {  op.output(out, sCxt) ; }
        } ;
View Full Code Here

Examples of com.sun.msv.datatype.SerializationContext

        if (exp.dt instanceof XSDatatypeImpl) {
            XSDatatypeImpl base = (XSDatatypeImpl)exp.dt;

            final Vector ns = new Vector();

            String lex = base.convertToLexicalValue(exp.value, new SerializationContext() {
                public String getNamespacePrefix(String namespaceURI) {
                    int cnt = ns.size() / 2;
                    ns.add("xmlns:ns" + cnt);
                    ns.add(namespaceURI);
                    return "ns" + cnt;
View Full Code Here

Examples of flex.messaging.io.SerializationContext

public class SerializationContextProvider {

  public SerializationContext get()
  {
    // Threadlocal SerializationContent
    SerializationContext serializationContext = SerializationContext
        .getSerializationContext();
    serializationContext.enableSmallMessages = true;
    serializationContext.instantiateTypes = true;
    // use _remoteClass field
    serializationContext.supportRemoteClass = true;
View Full Code Here

Examples of org.apache.axis.encoding.SerializationContext

        return deployment;
    }

    public Document getDOMDocument() throws ConfigurationException {
        StringWriter writer = new StringWriter();
        SerializationContext context = new SerializationContextImpl(writer, null);
        context.setPretty(true);
        try {
            deployment.writeToContext(context);
        } catch (Exception e) {
            log.error(Messages.getMessage("exception00"), e);
        }
View Full Code Here

Examples of org.apache.axis.encoding.SerializationContext

        RPCElement body = new RPCElement("urn:myNamespace", "method1", new Object[]{ arg });
        msg.addBodyElement(body);
        body.setEncodingStyle(null);

        Writer stringWriter = new StringWriter();
        SerializationContext context = new SerializationContextImpl(stringWriter, msgContext);
        context.setDoMultiRefs(false)// no multirefs
        context.setPretty(false);

        // Create a TypeMapping and register the Bean serializer/deserializer
        TypeMappingRegistry reg = context.getTypeMappingRegistry();
        TypeMapping tm = (TypeMapping) reg.createTypeMapping();
        // The "" namespace is literal (no encoding).
        tm.setSupportedEncodings(new String[] {Constants.URI_DEFAULT_SOAP_ENC});
        reg.register(Constants.URI_DEFAULT_SOAP_ENC, tm);
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.