Examples of Encoding


Examples of org.jcodings.Encoding

    //   System.out.printf("  * %d\n", pair.bytePos);
    // }
   
    Arrays.sort(pairs);
    Encoding enc = UTF8Encoding.INSTANCE;
    byte[] bytes;
    try {
      bytes = text.getBytes("UTF-8");
    } catch (UnsupportedEncodingException e) {
      e.printStackTrace();
View Full Code Here

Examples of org.jfree.fonts.encoding.Encoding

  public static String readString (final byte[] data, final int pos,
                                   final int length, final String encoding)
          throws EncodingException
  {
    final Encoding enc;
    if ("UTF-16".equals(encoding))
    {
      enc = EncodingRegistry.getInstance().getEncoding("UTF-16LE");
    }
    else
    {
      enc = EncodingRegistry.getInstance().getEncoding(encoding);
    }
    final ByteBuffer byteBuffer = new ByteBuffer(data, pos, length);
    final CodePointBuffer cp = enc.decode(byteBuffer, null);
    return Utf16LE.getInstance().encodeString(cp);
  }
View Full Code Here

Examples of org.omg.IOP.Encoding

public class RMIInitializer extends LocalObject implements ORBInitializer {
    static final Logger logger = Logger.getLogger(RMIInitializer.class
            .getName());

    public void pre_init(ORBInitInfo info) {
        Encoding encoding = new Encoding(ENCODING_CDR_ENCAPS.value, (byte)1,(byte) 0);
        CodecFactory codecFactory = info.codec_factory();
        try {
            Codec codec = codecFactory.create_codec(encoding);
            RMIInterceptor rmiInterceptor = new RMIInterceptor(codec);
            info.add_ior_interceptor(rmiInterceptor);
View Full Code Here

Examples of org.omg.IOP.Encoding

    @Override
    public void post_init(ORBInitInfo info) {
        try {
            // use CDR encapsulation with GIOP 1.0 encoding.
            Encoding encoding = new Encoding(ENCODING_CDR_ENCAPS.value,
                    (byte) 1, /* GIOP version */
                    (byte) /* GIOP revision*/);
            Codec codec = info.codec_factory().create_codec(encoding);

            // add IOR interceptor for CSIv2.
View Full Code Here

Examples of org.omg.IOP.Encoding

    }

    public void post_init(ORBInitInfo info) {
        try {
            // Use CDR encapsulation with GIOP 1.0 encoding
            Encoding encoding = new Encoding(ENCODING_CDR_ENCAPS.value,
                    (byte) 1, /* GIOP version */
                    (byte) /* GIOP revision*/);
            Codec codec = info.codec_factory().create_codec(encoding);

            // Get a reference to the PICurrent
View Full Code Here

Examples of org.omg.IOP.Encoding

    }

    public void post_init(ORBInitInfo info) {
        try {
            // Use CDR encapsulation with GIOP 1.0 encoding
            Encoding encoding = new Encoding(ENCODING_CDR_ENCAPS.value,
                    (byte) 1, /* GIOP version */
                    (byte) /* GIOP revision*/);
            Codec codec = info.codec_factory().create_codec(encoding);
            info.add_ior_interceptor(new TxIORInterceptor(codec));
        } catch (Exception e) {
View Full Code Here

Examples of org.omg.IOP.Encoding

    @Override
    public void post_init(ORBInitInfo info) {
        try {
            // use CDR encapsulations with GIOP 1.0 encoding.
            Encoding encoding = new Encoding(ENCODING_CDR_ENCAPS.value,
                    (byte) 1, /* GIOP version */
                    (byte) /* GIOP revision*/);
            Codec codec = info.codec_factory().create_codec(encoding);

            // create and register client interceptor.
View Full Code Here

Examples of org.omg.IOP.Encoding

    public void post_init(ORBInitInfo info) {
        try {
            org.omg.CORBA.Object obj;

            // Use CDR encapsulations with GIOP 1.0 encoding.
            Encoding encoding = new Encoding(ENCODING_CDR_ENCAPS.value,
                    (byte) 1, /* GIOP version */
                    (byte) /* GIOP revision*/);
            Codec codec = info.codec_factory().create_codec(encoding);

            // Create and register client interceptor.
View Full Code Here

Examples of org.omg.IOP.Encoding

        Codec codec = null;
        try {
            codec = info.codec_factory()
                    .create_codec(
                            new Encoding(ENCODING_CDR_ENCAPS.value, (byte) 1,
                                         (byte) 2));
        }
        catch (UnknownEncoding ex) {
            log.log(Level.SEVERE, "Could not get codec: ", ex);
            return;
View Full Code Here

Examples of org.omg.IOP.Encoding

    public static void setORB(ORB orb) throws UserException {
        if (Java2IDLUtil.orb == null) {
            Java2IDLUtil.orb = orb;
            CodecFactory factory = (CodecFactory) Java2IDLUtil.orb.resolve_initial_references("CodecFactory");
            codec = factory.create_codec(new Encoding(ENCODING_CDR_ENCAPS.value, (byte) 1, (byte) 2));
        }
    }
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.