Secure iNet Factory

com.jscape.inet.pop
Class PopMessageReader

java.lang.Object
  extended by java.io.Reader
      extended by java.io.InputStreamReader
          extended by com.jscape.inet.pop.PopMessageReader
All Implemented Interfaces:
java.io.Closeable, java.lang.Readable

public class PopMessageReader
extends java.io.InputStreamReader

Reads email message from POP server. A new instance of this reader is created for each message retrieved using the Pop.getMessageReader method.

See Also:
Pop.getMessageReader(int)

Constructor Summary
PopMessageReader(java.io.InputStream input)
          Constructs a new PopMessageReader instance.
 
Method Summary
 int read()
          Reads a single character from stream skipping leading periods.
 int read(char[] cbuf, int offset, int length)
          Reads characters into a portion of an array.
 
Methods inherited from class java.io.InputStreamReader
close, getEncoding, ready
 
Methods inherited from class java.io.Reader
mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PopMessageReader

public PopMessageReader(java.io.InputStream input)
Constructs a new PopMessageReader instance.

Parameters:
input - the input stream to read from
Method Detail

read

public int read(char[] cbuf,
                int offset,
                int length)
         throws java.io.IOException
Reads characters into a portion of an array.

Overrides:
read in class java.io.InputStreamReader
Parameters:
cbuf - the destination buffer
offset - the offset at which to start storing characters
length - the maximum number of characters to read
Returns:
the number of characters read, or -1 if the end of the stream has been reached
Throws:
java.io.IOException - if an I/O related error occurs

read

public int read()
         throws java.io.IOException
Reads a single character from stream skipping leading periods.

Overrides:
read in class java.io.InputStreamReader
Returns:
the character read or -1 if end of stream has been reached.
Throws:
java.io.IOException - if an I/O related error occurs

Secure iNet Factory

Copyright © JSCAPE LLC. 1999-2011. All Rights Reserved