Examples of encoding()


Examples of com.redhat.ceylon.compiler.typechecker.TypeCheckerBuilder.encoding()

        String fileEncoding  = getEncoding();
        if (fileEncoding == null) {
            fileEncoding = CeylonConfig.get(DefaultToolOptions.DEFAULTS_ENCODING);
        }
        if (fileEncoding != null) {
            builder.encoding(fileEncoding);
        }
       
        typeChecker = builder.getTypeChecker();
        // collect all units we are typechecking
        initTypeCheckedUnits(typeChecker);
View Full Code Here

Examples of org.apache.cxf.jaxrs.client.WebClient.encoding()

    @Test
    public void testGetBookQueryGZIP() throws Exception {
        String address = "http://localhost:" + PORT + "/bookstore/";
        WebClient wc = WebClient.create(address);
        wc.acceptEncoding("gzip,deflate");
        wc.encoding("gzip");
        InputStream r = wc.get(InputStream.class);
        assertNotNull(r);
        GZIPInputStream in = new GZIPInputStream(r);
        String s = IOUtils.toString(in);
        in.close();
View Full Code Here

Examples of org.apache.cxf.jaxrs.client.WebClient.encoding()

    @Test
    public void testGetBookQueryGZIP() throws Exception {
        String address = "http://localhost:" + PORT + "/bookstore/";
        WebClient wc = WebClient.create(address);
        wc.acceptEncoding("gzip,deflate");
        wc.encoding("gzip");
        InputStream r = wc.get(InputStream.class);
        assertNotNull(r);
        GZIPInputStream in = new GZIPInputStream(r);
        String s = IOUtils.toString(in);
        in.close();
View Full Code Here

Examples of org.apache.cxf.jaxrs.client.WebClient.encoding()

    @Test
    public void testGetBookQueryGZIP() throws Exception {
        String address = "http://localhost:" + PORT + "/bookstore/";
        WebClient wc = WebClient.create(address);
        wc.acceptEncoding("gzip,deflate");
        wc.encoding("gzip");
        InputStream r = wc.get(InputStream.class);
        assertNotNull(r);
        GZIPInputStream in = new GZIPInputStream(r);
        String s = IOUtils.toString(in);
        in.close();
View Full Code Here

Examples of org.codehaus.preon.annotation.BoundString.encoding()

        }
        BoundString settings = metadata.getAnnotation(BoundString.class);
        if (String.class.equals(type) && settings != null) {
            try {
        Charset charset; // Encodings are now given as strings, and turned into Charsets
                charset = Charset.availableCharsets().get(settings.encoding());
                // This throws a NullPointerException if the Charset can't be found
                if (settings.size().length() > 0) {
                    Expression<Integer, Resolver> expr;
                    expr = Expressions.createInteger(context, settings.size());
                    return (Codec<T>) new FixedLengthStringCodec(
View Full Code Here

Examples of org.jruby.RubyString.encoding()

        IRubyObject value = get(key);
        if (value == null || !value.isTrue()) return defaultValue;

        RubyString str = value.convertToString();
        RuntimeInfo info = getRuntimeInfo();
        if (info.encodingsSupported() && str.encoding(context) != info.utf8.get()) {
            str = (RubyString)str.encode(context, info.utf8.get());
        }
        return str;
    }
View Full Code Here

Examples of org.jruby.RubyString.encoding()

    }

    private ByteList prepareByteList(ThreadContext context, IRubyObject value) {
        RubyString str = value.convertToString();
        RuntimeInfo info = RuntimeInfo.forRuntime(context.getRuntime());
        if (info.encodingsSupported() && str.encoding(context) != info.utf8.get()) {
            str = (RubyString)str.encode(context, info.utf8.get());
        }
        return str.getByteList().dup();
    }
View Full Code Here

Examples of org.jruby.RubyString.encoding()

    }

    private ByteList prepareByteList(ThreadContext context, IRubyObject value) {
        RubyString str = value.convertToString();
        RuntimeInfo info = RuntimeInfo.forRuntime(context.getRuntime());
        if (info.encodingsSupported() && str.encoding(context) != info.utf8.get()) {
            str = (RubyString)str.encode(context, info.utf8.get());
        }
        return str.getByteList().dup();
    }
View Full Code Here

Examples of org.jruby.RubyString.encoding()

        IRubyObject value = get(key);
        if (value == null || !value.isTrue()) return defaultValue;

        RubyString str = value.convertToString();
        RuntimeInfo info = getRuntimeInfo();
        if (info.encodingsSupported() && str.encoding(context) != info.utf8.get()) {
            str = (RubyString)str.encode(context, info.utf8.get());
        }
        return str;
    }
View Full Code Here

Examples of org.jruby.RubyString.encoding()

    }

    private ByteList prepareByteList(ThreadContext context, IRubyObject value) {
        RubyString str = value.convertToString();
        RuntimeInfo info = RuntimeInfo.forRuntime(context.getRuntime());
        if (info.encodingsSupported() && str.encoding(context) != info.utf8.get()) {
            str = (RubyString)str.encode(context, info.utf8.get());
        }
        return str.getByteList().dup();
    }
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.