rice.email.proxy.util
Class LimitedStringWriter
java.lang.Object
java.io.Writer
java.io.StringWriter
rice.email.proxy.util.LimitedStringWriter
-
All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable, java.lang.Appendable
-
public class LimitedStringWriter
- extends java.io.StringWriter
Field Summary |
protected int |
capacity
The capacity of the writer |
Fields inherited from class java.io.Writer |
lock |
Constructor Summary |
LimitedStringWriter(int capacity)
Constructor which takes a maximum capacity |
Method Summary |
void |
write(char[] c,
int off,
int len)
First checks to see if this will put us over capacity, and if
so, throws a StringWriterOverflowException. |
void |
write(int c)
First checks to see if this will put us over capacity, and if
so, throws a StringWriterOverflowException. |
void |
write(java.lang.String str)
First checks to see if this will put us over capacity, and if
so, throws a StringWriterOverflowException. |
void |
write(java.lang.String str,
int off,
int len)
First checks to see if this will put us over capacity, and if
so, throws a StringWriterOverflowException. |
Methods inherited from class java.io.StringWriter |
append, append, append, close, flush, getBuffer, toString |
Methods inherited from class java.io.Writer |
write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
capacity
protected int capacity
- The capacity of the writer
LimitedStringWriter
public LimitedStringWriter(int capacity)
- Constructor which takes a maximum capacity
- Parameters:
-
capacity
- The capacity
write
public void write(int c)
- First checks to see if this will put us over capacity, and if
so, throws a StringWriterOverflowException. Otherwise, proceeds
as normal
-
- Overrides:
-
write
in class java.io.StringWriter
-
- Parameters:
-
c
- The character
write
public void write(char[] c,
int off,
int len)
- First checks to see if this will put us over capacity, and if
so, throws a StringWriterOverflowException. Otherwise, proceeds
as normal
-
- Overrides:
-
write
in class java.io.StringWriter
-
- Parameters:
-
c
- The array-
off
- The offset-
len
- The length
write
public void write(java.lang.String str)
- First checks to see if this will put us over capacity, and if
so, throws a StringWriterOverflowException. Otherwise, proceeds
as normal
-
- Overrides:
-
write
in class java.io.StringWriter
-
- Parameters:
-
str
- The string
write
public void write(java.lang.String str,
int off,
int len)
- First checks to see if this will put us over capacity, and if
so, throws a StringWriterOverflowException. Otherwise, proceeds
as normal
-
- Overrides:
-
write
in class java.io.StringWriter
-
- Parameters:
-
str
- The string-
off
- The offset-
len
- The length
Copyright © 2001-2005 - Rice Pastry.