From mime4j-dev-return-2360-archive-asf-public=cust-asf.ponee.io@james.apache.org Fri Mar 9 08:20:04 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 5245A180677 for ; Fri, 9 Mar 2018 08:20:04 +0100 (CET) Received: (qmail 15264 invoked by uid 500); 9 Mar 2018 07:20:03 -0000 Mailing-List: contact mime4j-dev-help@james.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mime4j-dev@james.apache.org Delivered-To: mailing list mime4j-dev@james.apache.org Received: (qmail 15091 invoked by uid 99); 9 Mar 2018 07:20:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Mar 2018 07:20:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id CE860C119C for ; Fri, 9 Mar 2018 07:20:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.391 X-Spam-Level: X-Spam-Status: No, score=-1.391 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_MED=-2.3, SPF_FAIL=0.919, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id tsMyC8hImgZn for ; Fri, 9 Mar 2018 07:20:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id E58065F56D for ; Fri, 9 Mar 2018 07:20:00 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 642D8E00EA for ; Fri, 9 Mar 2018 07:20:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 2006821429 for ; Fri, 9 Mar 2018 07:20:00 +0000 (UTC) Date: Fri, 9 Mar 2018 07:20:00 +0000 (UTC) From: "Tellier Benoit (JIRA)" To: mime4j-dev@james.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (MIME4J-268) Helper method for message to bytes convertion MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Tellier Benoit created MIME4J-268: ------------------------------------- Summary: Helper method for message to bytes convertion Key: MIME4J-268 URL: https://issues.apache.org/jira/browse/MIME4J-268 Project: James Mime4j Issue Type: New Feature Components: dom Reporter: Tellier Benoit Current code looks like this: {code:java} public byte[] asBytes(Message message) throws IOException { ByteArrayOutputStream buffer = new ByteArrayOutputStream(); DefaultMessageWriter writer = new DefaultMessageWriter(); writer.writeMessage(message, buffer); return buffer.toByteArray(); } {code} This is rather complicated for clients. I would propose to introduce that helper method in *DefaultMessageWriter*. -- This message was sent by Atlassian JIRA (v7.6.3#76005)