class MimeMessageInputStreamSource extends MimeMessageSource implements Disposable {

    @Override
    public synchronized InputStream getInputStream() throws IOException {
        InputStream in;
        if (out.isInMemory()) {
            in = new SharedByteArrayInputStream(out.getData());
        } else {
            in = new SharedFileInputStream(out.getFile());
        }
        streams.add(in);
        return in;
    }

    public  MimeMessageInputStreamSource(String key, InputStream in);
    public  MimeMessageInputStreamSource(String key);

}