Class ElementOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.ByteArrayOutputStream
-
- org.wso2.carbon.mediator.transform.stream.ElementOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
public class ElementOutputStream extends ByteArrayOutputStream
This class extends ByteArrayOutputStream. The internal byte array can be resized by removing read part of the array.
-
-
Field Summary
-
Fields inherited from class java.io.ByteArrayOutputStream
buf, count
-
-
Constructor Summary
Constructors Constructor Description ElementOutputStream()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
resizeBuffer(int i)
The read data of the buffer is removed and rest is assigned.-
Methods inherited from class java.io.ByteArrayOutputStream
close, reset, size, toByteArray, toString, toString, toString, toString, write, write, writeBytes, writeTo
-
Methods inherited from class java.io.OutputStream
flush, nullOutputStream, write
-
-
-
-
Method Detail
-
resizeBuffer
public void resizeBuffer(int i)
The read data of the buffer is removed and rest is assigned. For example if i=100 & this.buf.length=120 then copy byte 101 to 120 and assign to this.buf So the first 100 bytes are removed from this.buf- Parameters:
i
- Position up to which the buffer had been read
-
-