Package nl.tue.storage
Class ResizeableFastByteArrayOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- nl.tue.storage.FastByteArrayOutputStream
-
- nl.tue.storage.ResizeableFastByteArrayOutputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
public class ResizeableFastByteArrayOutputStream extends FastByteArrayOutputStream
ByteArrayOutputStream implementation that doesn't synchronize methods and doesn't copy the data on toByteArray(). Furthermore, no capacity changes are allowed. Once the initial capacity it set, it is assumed final!
-
-
Field Summary
-
Fields inherited from class nl.tue.storage.FastByteArrayOutputStream
buf, size
-
-
Constructor Summary
Constructors Constructor Description ResizeableFastByteArrayOutputStream(int initSize)Constructs a stream with the given initial size
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidwrite(byte[] b)voidwrite(byte[] b, int off, int len)voidwrite(int b)-
Methods inherited from class nl.tue.storage.FastByteArrayOutputStream
getByteArray, getSize, reset
-
-
-
-
Method Detail
-
write
public void write(byte[] b)
- Overrides:
writein classFastByteArrayOutputStream
-
write
public void write(byte[] b, int off, int len)- Overrides:
writein classFastByteArrayOutputStream
-
write
public void write(int b)
- Overrides:
writein classFastByteArrayOutputStream
-
-