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 int
private int
private int
private int
Fields inherited from class java.io.FilterOutputStream
out
-
Constructor Summary
ConstructorsConstructorDescriptionTrimmerOutputStream
(OutputStream out, int bufferSize, int startTrimLength, int endTrimLength) -
Method Summary
Methods inherited from class java.io.FilterOutputStream
close
Methods inherited from class java.io.OutputStream
nullOutputStream
-
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:
write
in classFilterOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classFilterOutputStream
- Throws:
IOException
-