@Test public void testDecode_IgnoreExtraParts() throws Exception { AdaptrisMessage result = mimeEncoder.decode(createMimeOutput(true, true)); assertEquals(METADATA_VALUE, result.getMetadataValue(METADATA_KEY)); assertEquals(STANDARD_PAYLOAD, result.getContent()); assertTrue(MessageDigest.isEqual(STANDARD_PAYLOAD.getBytes(), result.getPayload())); }
public AdaptrisMessage decode(byte[] bytes) throws CoreException { try (ByteArrayInputStream in = new ByteArrayInputStream(bytes)) { return readMessage(in); } catch (Exception e) { throw new CoreException(e); } }
MimeEncoder extends MimeEncoderImpl<OutputStream, InputStream> { public AdaptrisMessage decode(byte[] bytes) throws CoreException { try (ByteArrayInputStream in = new ByteArrayInputStream(bytes)) { return readMessage(in); } catch (Exception e) { throw new CoreException(e); } } }
MimeEncoder extends MimeEncoderImpl<OutputStream, InputStream> { public AdaptrisMessage decode(byte[] bytes) throws CoreException { try (ByteArrayInputStream in = new ByteArrayInputStream(bytes)) { return readMessage(in); } catch (Exception e) { throw new CoreException(e); } } MimeEncoder();  MimeEncoder(Boolean retainUniqueId, String metadataEncoding, String payloadEncoding); }
MimeEncoder extends MimeEncoderImpl<OutputStream, InputStream> { public AdaptrisMessage decode(byte[] bytes) throws CoreException { try (ByteArrayInputStream in = new ByteArrayInputStream(bytes)) { return readMessage(in); } catch (Exception e) { throw new CoreException(e); } } MimeEncoder();  MimeEncoder(Boolean retainUniqueId, String metadataEncoding, String payloadEncoding); @Override void writeMessage(AdaptrisMessage msg, OutputStream target); @Override AdaptrisMessage readMessage(InputStream source); byte[] encode(AdaptrisMessage msg); AdaptrisMessage decode(byte[] bytes); }
MimeEncoder extends MimeEncoderImpl<OutputStream, InputStream> { public AdaptrisMessage decode(byte[] bytes) throws CoreException { try (ByteArrayInputStream in = new ByteArrayInputStream(bytes)) { return readMessage(in); } catch (Exception e) { throw new CoreException(e); } } MimeEncoder();  MimeEncoder(Boolean retainUniqueId, String metadataEncoding, String payloadEncoding); @Override void writeMessage(AdaptrisMessage msg, OutputStream target); @Override AdaptrisMessage readMessage(InputStream source); byte[] encode(AdaptrisMessage msg); AdaptrisMessage decode(byte[] bytes);  }