Class TrimmerOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.apache.xml.security.stax.impl.util.TrimmerOutputStream
- All Implemented Interfaces:
Closeable, Flushable, AutoCloseable
Trimms the start and the end of a stream
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate byte[]private intprivate intprivate intprivate intFields inherited from class FilterOutputStream
out -
Constructor Summary
ConstructorsConstructorDescriptionTrimmerOutputStream(OutputStream out, int bufferSize, int startTrimLength, int endTrimLength) -
Method Summary
Methods inherited from class FilterOutputStream
close
-
Field Details
-
buffer
private byte[] buffer -
bufferedCount
private int bufferedCount -
preTrimmed
private int preTrimmed -
startTrimLength
private int startTrimLength -
endTrimLength
private int endTrimLength
-
-
Constructor Details
-
TrimmerOutputStream
public TrimmerOutputStream(OutputStream out, int bufferSize, int startTrimLength, int endTrimLength)
-
-
Method Details
-
flushBuffer
- Throws:
IOException
-
write
- Overrides:
writein classFilterOutputStream- Throws:
IOException
-
write
- Overrides:
writein classFilterOutputStream- Throws:
IOException
-
write
- Overrides:
writein classFilterOutputStream- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Overrides:
flushin classFilterOutputStream- Throws:
IOException
-