org.subethamail.smtp.io
Class ReceivedHeaderStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by org.subethamail.smtp.io.ReceivedHeaderStream
All Implemented Interfaces:
Closeable

public class ReceivedHeaderStream
extends FilterInputStream

Prepends a Received: header at the beginning of the input stream.


Field Summary
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
ReceivedHeaderStream(InputStream in, String heloHost, InetAddress host, String whoami, String softwareName, String id, String singleRecipient)
           
 
Method Summary
 int available()
           
 void close()
           
 void mark(int readlimit)
           
 boolean markSupported()
           
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int off, int len)
           
 void reset()
           
 long skip(long n)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReceivedHeaderStream

public ReceivedHeaderStream(InputStream in,
                            String heloHost,
                            InetAddress host,
                            String whoami,
                            String softwareName,
                            String id,
                            String singleRecipient)
Parameters:
softwareName - A software name and version, or null if this information should not be printed
singleRecipient - The single recipient of the message. If there are more than one recipients then this must be null.
Method Detail

available

public int available()
              throws IOException
Overrides:
available in class FilterInputStream
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class FilterInputStream
Throws:
IOException

mark

public void mark(int readlimit)
Overrides:
mark in class FilterInputStream

markSupported

public boolean markSupported()
Overrides:
markSupported in class FilterInputStream

read

public int read()
         throws IOException
Overrides:
read in class FilterInputStream
Throws:
IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Overrides:
read in class FilterInputStream
Throws:
IOException

read

public int read(byte[] b)
         throws IOException
Overrides:
read in class FilterInputStream
Throws:
IOException

reset

public void reset()
           throws IOException
Overrides:
reset in class FilterInputStream
Throws:
IOException

skip

public long skip(long n)
          throws IOException
Overrides:
skip in class FilterInputStream
Throws:
IOException


Copyright © 2006-2012. All Rights Reserved.