org.subethamail.smtp.io.DeferredFileOutputStream Java Examples

The following examples show how to use org.subethamail.smtp.io.DeferredFileOutputStream. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FilterChainMessageHandler.java    From mireka with Apache License 2.0 5 votes vote down vote up
private DeferredFileOutputStream copyDataToDeferredFileOutputStream(
        InputStream src) throws IOException {
    byte[] buffer = new byte[8192];
    DeferredFileOutputStream deferredFileOutputStream =
            new DeferredFileOutputStream(32768);
    int cRead;
    while ((cRead = src.read(buffer)) > 0) {
        deferredFileOutputStream.write(buffer, 0, cRead);
    }
    return deferredFileOutputStream;
}
 
Example #2
Source File: DeferredFileMailData.java    From mireka with Apache License 2.0 2 votes vote down vote up
/**
 * Constructs a new DeferredFileMailData so that it contains the message
 * content residing in the specified stream.
 * 
 * @param deferredFileOutputStream
 *            The stream containing the message content.
 */
public DeferredFileMailData(
        DeferredFileOutputStream deferredFileOutputStream) {
    this.deferredFileOutputStream = deferredFileOutputStream;
}