Package com.sun.mail.imap
Class LengthCounter
- java.lang.Object
-
- java.io.OutputStream
-
- com.sun.mail.imap.LengthCounter
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
class LengthCounter extends java.io.OutputStreamCount the number of bytes written to the stream. Also, save a copy of small messages to avoid having to process the data again.
-
-
Constructor Summary
Constructors Constructor Description LengthCounter(int maxsize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getBytes()intgetSize()voidwrite(byte[] b)voidwrite(byte[] b, int off, int len)voidwrite(int b)
-
-
-
Method Detail
-
write
public void write(int b)
- Specified by:
writein classjava.io.OutputStream
-
write
public void write(byte[] b, int off, int len)- Overrides:
writein classjava.io.OutputStream
-
write
public void write(byte[] b) throws java.io.IOException- Overrides:
writein classjava.io.OutputStream- Throws:
java.io.IOException
-
getSize
public int getSize()
-
getBytes
public byte[] getBytes()
-
-