Examples of Serializer


Examples of com.taobao.metamorphosis.utils.codec.Serializer

    }


    @Test
    public void testJavaEncoder() throws Exception {
        final Serializer encoder = CodecBuilder.buildSerializer(Codec_Type.JAVA);
        byte buf[] = null;

        for (int i = 0; i < 100000; i++) {
            buf = encoder.encodeObject(this.msg);
        }

        Assert.assertTrue(buf != null && buf.length > 0);
    }
View Full Code Here

Examples of com.thinkaurelius.titan.graphdb.database.serialize.Serializer



    public Serializer getSerializer() {
        Configuration config = configuration.subset(ATTRIBUTE_NAMESPACE);
        Serializer serializer = new KryoSerializer(config);
        for (RegisteredAttributeClass<?> clazz : getRegisteredAttributeClasses(config)) {
            clazz.registerWith(serializer);
        }
        return serializer;
    }
View Full Code Here

Examples of de.willuhn.jameica.hbci.io.ser.Serializer

    {
      this.profile = new Profile();
      this.profile.setSkipLines(1);
      this.profile.setVersion(0);
     
      Serializer ts = new DefaultSerializer();
      Serializer vs = new ValueSerializer();
      Serializer ds = new DateSerializer();
     
      List<Column> list = this.profile.getColumns();
      int i = 3; // wir fangen bei Spalte 4 an, weil die ersten 3 Spalten von Hibiscus
                 // zwar exportiert werden (Kontonummer, BLZ, Name des eigenen Kontos),
                 // diese Information beim Import aber nicht benoetigt wird (kriegen
View Full Code Here

Examples of javax.media.jai.remote.Serializer

                                   SerializerImpl.class, false);
        }

        int numClasses = classes.length;
        for(int i = 0; i < numClasses; i++) {
            Serializer s = new SerializerImpl(ssi, classes[i],
                                              supportsSubclasses);
            SerializerFactory.registerSerializer(s);
        }
    }
View Full Code Here

Examples of jdbm.Serializer

        }     
        return (K[]) ret;
      }

     
      Serializer ser = _btree.keySerializer!=null? _btree.keySerializer : DefaultSerializer.INSTANCE;
      OpenByteArrayInputStream in1 = null;
      SerializerInput in2 = null;
      byte[] previous = null;
      for(int i = firstUse;i<_btree._pageSize;i++){
        byte[] b = LeadingValueCompressionProvider.readByteArray(ois, previous, 0);
        if(b == null ) continue;
        if(in1 == null){
          in1 = new OpenByteArrayInputStream(b);
          in2 = new SerializerInput(in1);
        }
        in1.reset(b, b.length);
        ret[i] = ser.deserialize(in2);
        previous = b;
      }
      return (K[]) ret;     

    }else{
View Full Code Here

Examples of me.prettyprint.hector.api.Serializer

   * @return ByteBuffer object
   */
  @SuppressWarnings("unchecked")
  public ByteBuffer toByteBuffer(Object value) {
    ByteBuffer byteBuffer = null;
    Serializer serializer = GoraSerializerTypeInferer.getSerializer(value);
    if (serializer == null) {
      LOG.info("Serializer not found for: " + value.toString());
    }
    else {
      byteBuffer = serializer.toByteBuffer(value);
    }

    if (byteBuffer == null) {
      LOG.info("value class=" + value.getClass().getName() + " value=" + value + " -> null");
    }
View Full Code Here

Examples of mf.org.apache.xml.serialize.Serializer

                    fSerializerFactory = SerializerFactory.getSerializerFactory(Method.XML);
                }

                // there doesn't seem to be a way to reset a serializer, so we need to make
                // a new one each time.
                Serializer ser;
                if (streamResult.getWriter() != null) {
                    ser = fSerializerFactory.makeSerializer(streamResult.getWriter(), new OutputFormat());
                }
                else if (streamResult.getOutputStream() != null) {
                    ser = fSerializerFactory.makeSerializer(streamResult.getOutputStream(), new OutputFormat());
                }
                else if (streamResult.getSystemId() != null) {
                    String uri = streamResult.getSystemId();
                    OutputStream out = XMLEntityManager.createOutputStream(uri);
                    ser = fSerializerFactory.makeSerializer(out, new OutputFormat());
                }
                else {
                    throw new IllegalArgumentException(JAXPValidationMessageFormatter.formatMessage(fComponentManager.getLocale(),
                        "StreamResultNotInitialized", null));
                }

                // we're using the parser only as an XNI-to-SAX converter,
                // so that we can use the SAX-based serializer
                SAXParser parser = (SAXParser) fParser.get();
                if (newConfig || parser == null) {
                    parser = new SAXParser(config);
                    fParser = new SoftReference(parser);
                }
                else {
                    parser.reset();
                }
                config.setDocumentHandler(fSchemaValidator);
                fSchemaValidator.setDocumentHandler(parser);
                parser.setContentHandler(ser.asContentHandler());
            }
            else {
                fSchemaValidator.setDocumentHandler(null);
            }
           
View Full Code Here

Examples of net.kuujo.vertigo.util.serialization.Serializer

  public static class SomeExtendingObject extends SomeObject {}

  @Test
  public void testFindSerializer() {
    Serializer serializer1 = SerializerFactory.getSerializer(SomeExtendingObject.class);
    Serializer serializer2 = SerializerFactory.getSerializer(SomeObject.class);
    assertEquals(serializer1, serializer2);
    Serializer serializer3 = SerializerFactory.getSerializer(SomeExtendingInterface.class);
    assertEquals(serializer1, serializer3);
  }
View Full Code Here

Examples of net.sf.oqt.core.Serializer

  @Test
  public void testExecute() throws MojoExecutionException, MojoFailureException, ClassNotFoundException, IOException {
    mojo.execute();
    File outputSer = new File(project.getBuild().getDirectory() + "/querytranslator/output.ser");
    assertThat(outputSer).isNotNull().exists();
    Serializer s = new Serializer(project);
    ResultVO r = s.deserialize();
    assertThat(r).isNotNull();
    Collection<PackageVO> packages = r.getPackages();
    assertThat(packages).isNotNull().isNotEmpty().hasSize(3);
    Collection<EntityVO> entities = r.getPackages().iterator().next().getEntities();
    assertThat(entities).isNotNull().isNotEmpty().hasSize(TestInfo.numberOfEntities - TestInfo.numberOfEntitiesInGenericPackage - TestInfo.numberOfEntitiesInSubPackage);
View Full Code Here

Examples of net.sf.saxon.s9api.Serializer

            XQueryCompiler xqcomp = qtproc.newXQueryCompiler();
            XQueryExecutable xqexec = xqcomp.compile(".");
            XQueryEvaluator xqeval = xqexec.load();
            xqeval.setContextItem(doc);

            serializer = new Serializer();

            serializer.setOutputProperty(Serializer.Property.BYTE_ORDER_MARK, serial.getByteOrderMark() ? "yes" : "no");
            // FIXME: support CDATA_SECTION_ELEMENTS
            if (serial.getDoctypePublic() != null) {
                serializer.setOutputProperty(Serializer.Property.DOCTYPE_PUBLIC, serial.getDoctypePublic());
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.