Examples of EncoderFactory


Examples of org.apache.avro.io.EncoderFactory

    }

    @Override
    public void open(OutputStream out) throws IOException {
      this.out = out;
      this.encoder = new EncoderFactory().configureBlockSize(512).binaryEncoder(out, null);
    }
View Full Code Here

Examples of org.apache.avro.io.EncoderFactory

    }

    @Override
    public void open(OutputStream out) throws IOException {
      this.out = out;
      this.encoder = new EncoderFactory().configureBlockSize(512).binaryEncoder(out, null);
    }
View Full Code Here

Examples of org.apache.avro.io.EncoderFactory

    ReflectDatumWriter<Object> writer = new ReflectDatumWriter<Object>(schema);
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    if (!blocking) {
      writer.write(datum, EncoderFactory.get().directBinaryEncoder(out, null));
    } else {
      writer.write(datum, new EncoderFactory().configureBlockSize(64)
          .blockingBinaryEncoder(out, null));
    }
    writer.write(datum, EncoderFactory.get().directBinaryEncoder(out, null));
    byte[] data = out.toByteArray();
View Full Code Here

Examples of org.apache.avro.io.EncoderFactory

      this.writer = writer;
    }

    public void open(OutputStream out) {
      this.out = out;
      this.encoder = new EncoderFactory().configureBlockSize(512).binaryEncoder(out, null);
    }
View Full Code Here

Examples of org.apache.avro.io.EncoderFactory

      this.writer = writer;
    }

    public void open(OutputStream out) {
      this.out = out;
      this.encoder = new EncoderFactory().configureBlockSize(512)
          .binaryEncoder(out, null);
    }
View Full Code Here

Examples of org.apache.avro.io.EncoderFactory

    }
   
    @Override
    public void open(OutputStream out) throws IOException {
      this.out = out;
      this.encoder = new EncoderFactory().configureBlockSize(512)
          .binaryEncoder(out, null);
    }
View Full Code Here

Examples of org.apache.directory.server.kerberos.shared.io.encoder.EncoderFactory

        if ( clazz == null )
        {
            throw new IOException( I18n.err( I18n.ERR_597, encodableClass ) );
        }

        EncoderFactory factory = null;

        try
        {
            factory = ( EncoderFactory ) clazz.newInstance();
        }
        catch ( IllegalAccessException iae )
        {
            throw new IOException( I18n.err( I18n.ERR_601, encodableClass ) );
        }
        catch ( InstantiationException ie )
        {
            throw new IOException( I18n.err( I18n.ERR_599, encodableClass ) );
        }

        Encoder encoder = factory.getEncoder();

        return encoder.encode( encodable );
    }
View Full Code Here

Examples of org.apache.directory.server.kerberos.shared.io.encoder.EncoderFactory

        if ( clazz == null )
        {
            throw new IOException( "Encoder unavailable for " + encodableClass );
        }

        EncoderFactory factory = null;

        try
        {
            factory = ( EncoderFactory ) clazz.newInstance();
        }
        catch ( IllegalAccessException iae )
        {
            throw new IOException( "Error accessing encoder for " + encodableClass );
        }
        catch ( InstantiationException ie )
        {
            throw new IOException( "Error instantiating encoder for " + encodableClass );
        }

        Encoder encoder = factory.getEncoder();

        return encoder.encode( encodable );
    }
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.