Class TrimmerOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FilterOutputStream
-
- org.apache.xml.security.stax.impl.util.TrimmerOutputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
public class TrimmerOutputStream extends java.io.FilterOutputStreamTrimms the start and the end of a stream
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]bufferprivate intbufferedCountprivate intendTrimLengthprivate intpreTrimmedprivate intstartTrimLength
-
Constructor Summary
Constructors Constructor Description TrimmerOutputStream(java.io.OutputStream out, int bufferSize, int startTrimLength, int endTrimLength)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidflush()private voidflushBuffer()voidwrite(byte[] b)voidwrite(byte[] b, int off, int len)voidwrite(int b)
-
-
-
Method Detail
-
flushBuffer
private void flushBuffer() throws java.io.IOException- Throws:
java.io.IOException
-
write
public void write(int b) throws java.io.IOException- Overrides:
writein classjava.io.FilterOutputStream- Throws:
java.io.IOException
-
write
public void write(byte[] b) throws java.io.IOException- Overrides:
writein classjava.io.FilterOutputStream- Throws:
java.io.IOException
-
write
public void write(byte[] b, int off, int len) throws java.io.IOException- Overrides:
writein classjava.io.FilterOutputStream- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException- Specified by:
flushin interfacejava.io.Flushable- Overrides:
flushin classjava.io.FilterOutputStream- Throws:
java.io.IOException
-
-