Examples of PlaintextFormatter


Examples of de.innovationgate.wgpublisher.webtml.utils.PlainTextFormatter

        }
        else if (encode.equalsIgnoreCase(ENCODER_CRLF)) {
            formatter = new CRLFEncoder();
        }
        else if (encode.equalsIgnoreCase(ENCODER_PLAINTEXT)) {
            formatter = new PlainTextFormatter();
        }
        else if (encode.equalsIgnoreCase(ENCODER_JAVASCRIPT)) {
            formatter = new JavaScriptEncodingFormatter();
        }
        else if (encode.equalsIgnoreCase(ENCODER_NAMEPART)) {
View Full Code Here

Examples of net.sourceforge.align.formatter.PlaintextFormatter

      }
      String sourceFileName = commandLine.getArgs()[0];
      String targetFileName = commandLine.getArgs()[1];
      Writer sourceWriter = getWriter(getFileOutputStream(sourceFileName));
      Writer targetWriter = getWriter(getFileOutputStream(targetFileName));
      formatter = new PlaintextFormatter(sourceWriter, targetWriter);
    } else if (cls.equals("tmx")) {
      Writer writer = getSingleWriter(commandLine);
      String languages = commandLine.getOptionValue('l');
      if (languages == null) {
        throw new MissingParameterException("languages");
View Full Code Here

Examples of org.apache.axis2.format.PlainTextFormatter

        OMElement firstChild = msgContext.getEnvelope().getBody().getFirstElement();
        if (firstChild != null) {
            if (BaseConstants.DEFAULT_BINARY_WRAPPER.equals(firstChild.getQName())) {
                return new BinaryFormatter();
            } else if (BaseConstants.DEFAULT_TEXT_WRAPPER.equals(firstChild.getQName())) {
                return new PlainTextFormatter();
            }
        }
       
        // ... otherwise, let Axis choose the right message formatter:
        try {
View Full Code Here

Examples of org.apache.axis2.format.PlainTextFormatter

        OMElement firstChild = msgContext.getEnvelope().getBody().getFirstElement();
        if (firstChild != null) {
            if (BaseConstants.DEFAULT_BINARY_WRAPPER.equals(firstChild.getQName())) {
                return new BinaryFormatter();
            } else if (BaseConstants.DEFAULT_TEXT_WRAPPER.equals(firstChild.getQName())) {
                return new PlainTextFormatter();
            }
        }
       
        // ... otherwise, let Axis choose the right message formatter:
        try {
View Full Code Here

Examples of org.apache.axis2.format.PlainTextFormatter

 
  private void testGetBytes(String encoding) throws Exception {
    MessageContext messageContext = createMessageContext(testString);
        OMOutputFormat format = new OMOutputFormat();
        format.setCharSetEncoding(encoding);
        byte[] bytes = new PlainTextFormatter().getBytes(messageContext, format);
        assertEquals(testString, new String(bytes, encoding));
  }
View Full Code Here

Examples of org.apache.axis2.format.PlainTextFormatter

  private void testWriteTo(String encoding) throws Exception {
    MessageContext messageContext = createMessageContext(testString);
        OMOutputFormat format = new OMOutputFormat();
        format.setCharSetEncoding(encoding);
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        new PlainTextFormatter().writeTo(messageContext, format, baos, false);
        assertEquals(testString, new String(baos.toByteArray(), encoding));
  }
View Full Code Here

Examples of org.apache.axis2.format.PlainTextFormatter

        OMElement firstChild = msgContext.getEnvelope().getBody().getFirstElement();
        if (firstChild != null) {
            if (BaseConstants.DEFAULT_BINARY_WRAPPER.equals(firstChild.getQName())) {
                return new BinaryFormatter();
            } else if (BaseConstants.DEFAULT_TEXT_WRAPPER.equals(firstChild.getQName())) {
                return new PlainTextFormatter();
            }
        }
       
        // ... otherwise, let Axis choose the right message formatter:
        try {
View Full Code Here

Examples of org.apache.synapse.format.PlainTextFormatter

        OMElement firstChild = msgContext.getEnvelope().getBody().getFirstElement();
        if (firstChild != null) {
            if (BaseConstants.DEFAULT_BINARY_WRAPPER.equals(firstChild.getQName())) {
                return new BinaryFormatter();
            } else if (BaseConstants.DEFAULT_TEXT_WRAPPER.equals(firstChild.getQName())) {
                return new PlainTextFormatter();
            }
        }
       
        // ... otherwise, let Axis choose the right message formatter:
        try {
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.