Package xyz.cofe.cbuffer
Class ContentBufferOutputStream
java.lang.Object
java.io.OutputStream
xyz.cofe.cbuffer.ContentBufferOutputStream
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
public class ContentBufferOutputStream
extends java.io.OutputStream
Создает stream для записи
- Author:
- user
-
Field Summary
Fields Modifier and Type Field Description protected longbeginIndexprotected ContentBuffercontentBufferprotected longendIndexExclusiveprotected java.util.concurrent.locks.Locklockprotected longpointer -
Constructor Summary
Constructors Constructor Description ContentBufferOutputStream(ContentBuffer buffer)ContentBufferOutputStream(ContentBuffer buffer, long beginIndex)ContentBufferOutputStream(ContentBuffer buffer, long beginIndex, long endIndexExclusive)ContentBufferOutputStream(ContentBuffer buffer, long beginIndex, long endIndexExclusive, java.util.concurrent.locks.Lock lock) -
Method Summary
-
Field Details
-
lock
protected java.util.concurrent.locks.Lock lock -
contentBuffer
-
beginIndex
protected long beginIndex -
endIndexExclusive
protected long endIndexExclusive -
pointer
protected long pointer
-
-
Constructor Details
-
ContentBufferOutputStream
public ContentBufferOutputStream(ContentBuffer buffer, long beginIndex, long endIndexExclusive, java.util.concurrent.locks.Lock lock) -
ContentBufferOutputStream
-
ContentBufferOutputStream
-
ContentBufferOutputStream
-
-
Method Details
-
write
public void write(int b) throws java.io.IOException- Specified by:
writein classjava.io.OutputStream- Throws:
java.io.IOException
-
write
public void write(byte[] b, int off, int len) throws java.io.IOException- Overrides:
writein classjava.io.OutputStream- Throws:
java.io.IOException
-
write
public void write(byte[] b) throws java.io.IOException- Overrides:
writein classjava.io.OutputStream- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.OutputStream- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException- Specified by:
flushin interfacejava.io.Flushable- Overrides:
flushin classjava.io.OutputStream- Throws:
java.io.IOException
-