Package jodd.io

Examples of jodd.io.StringInputStream


   * @return
   * @throws Exception
   */
  public static InputStream byteTOFInputStream(byte[] in) throws Exception {

    InputStream is = new StringInputStream(InputStreamTOString(StreamUtils.byteTOInputStream(in)));
    return is;
  }
View Full Code Here


   */
  public static ReceivedEmail parseEML(String emlContent) throws MessagingException {
    Properties props = System.getProperties();
    Session session = Session.getDefaultInstance(props, null);

    Message message = new MimeMessage(session, new StringInputStream(emlContent, StringInputStream.Mode.ASCII));

    return new ReceivedEmail(message);
  }
View Full Code Here

    if (contentEncoding != null && contentEncoding().equals("gzip")) {
      if (body != null) {
        removeHeader(HEADER_CONTENT_ENCODING);
        try {
          StringInputStream in = new StringInputStream(body, StringInputStream.Mode.STRIP);
          GZIPInputStream gzipInputStream = new GZIPInputStream(in);
          StringOutputStream out = new StringOutputStream(StringPool.ISO_8859_1);

          StreamUtil.copy(gzipInputStream, out);
View Full Code Here

  /**
   * Loads properties from string.
   */
  public static void loadFromString(Properties p, String data) throws IOException {
    InputStream is = new StringInputStream(data, StringInputStream.Mode.ASCII);
    try {
      p.load(is);
    } finally {
      is.close();
    }
  }
View Full Code Here

TOP

Related Classes of jodd.io.StringInputStream

Copyright © 2018 www.massapicom. 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.