org.subethamail.smtp.io
Class DotTerminatedInputStream

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

public class DotTerminatedInputStream
extends InputStream

An InputStream class that terminates the stream when it encounters a US-ASCII encoded dot CR LF byte sequence immediately following a CR LF line end.


Constructor Summary
DotTerminatedInputStream(InputStream in)
          A constructor for this object that takes a stream to be wrapped and a terminating character sequence.
 
Method Summary
 int read()
           
 
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DotTerminatedInputStream

public DotTerminatedInputStream(InputStream in)
A constructor for this object that takes a stream to be wrapped and a terminating character sequence.

Parameters:
in - the InputStream to be wrapped
Throws:
IllegalArgumentException - if the terminator array is null or empty
Method Detail

read

public int read()
         throws IOException
Specified by:
read in class InputStream
Throws:
IOException


Copyright © 2006-2012. All Rights Reserved.