Package java.nio.charset

Examples of java.nio.charset.Charset.displayName()


        try {
            Charset charset = getTargetCharset(xml);

            input.setByteStream(new ByteArrayInputStream(xml.trim().getBytes(charset)));
            input.setEncoding(charset.displayName());
        } catch(UnsupportedEncodingException e) {
            throw new CitrusRuntimeException(e);
        }

        Document doc;
View Full Code Here


        LSInput receivedInput = createLSInput();
        try {
            Charset charset = getTargetCharset(messagePayload);
            receivedInput.setByteStream(new ByteArrayInputStream(messagePayload.trim().getBytes(charset)));
            receivedInput.setEncoding(charset.displayName());
        } catch(UnsupportedEncodingException e) {
            throw new CitrusRuntimeException(e);
        }

        return parser.parse(receivedInput);
View Full Code Here

    private static String getCharsetDisplayValue( String charsetRawValue )
    {
        try
        {
            Charset charset = Charset.forName( charsetRawValue );
            return charset.displayName();
        }
        catch ( Exception e )
        {
            return charsetRawValue;
        }
View Full Code Here

    private static String getCharsetDisplayValue( String charsetRawValue )
    {
        try
        {
            Charset charset = Charset.forName( charsetRawValue );
            return charset.displayName();
        }
        catch ( Exception e )
        {
            return charsetRawValue;
        }
View Full Code Here

            String chSet = ReaderUtils.getAttribute(elem, "value", true);

            try {
                Charset cs = Charset.forName(chSet);
                geoServer.setCharSet(cs);
                LOGGER.finer("charSet: " + cs.displayName());
            } catch (Exception ex) {
                LOGGER.info(ex.getMessage());
            }
        }
View Full Code Here

            rubyEncoding = findName(value);
        }
        if (rubyEncoding == null) return null;
        try {
            Charset charset = Charset.forName(rubyEncoding);
            return charset.displayName();
        } catch (IllegalCharsetNameException e) {
            throw context.getRuntime().newEncodingCompatibilityError(
                    rubyEncoding + "is not supported in Java.");
        } catch (IllegalArgumentException e) {
            throw context.getRuntime().newInvalidEncoding(
View Full Code Here

      HTTPUtils.write400SignatureVerificationFailed(theResp.getOutputStream(), false);
      return;
    }

    Charset charset = decoder.getCharset();
    ourLog.debug("Message charset is {}", charset.displayName());

    RawReceivable rawMessage = new RawReceivable(decoder.getMessage());
    rawMessage.addMetadata(MessageMetadataKeys.REMOTE_HOST_ADDRESS.name(), theReq.getRemoteAddr());

    IResponseSendable<String> response;
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.