Package com.twelvemonkeys.io
Class RandomAccessStream.OutputStreamView
java.lang.Object
java.io.OutputStream
com.twelvemonkeys.io.SeekableOutputStream
com.twelvemonkeys.io.RandomAccessStream.OutputStreamView
- All Implemented Interfaces:
Seekable
,Closeable
,Flushable
,AutoCloseable
- Enclosing class:
RandomAccessStream
-
Field Summary
FieldsFields inherited from class com.twelvemonkeys.io.SeekableOutputStream
closed, flushedPosition, markedPositions, position
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
flushBeforeImpl
(long pPosition) boolean
isCached()
Returns true if thisSeekable
stream caches data itself in order to allow seeking backwards.boolean
Returns true if thisSeekable
stream caches data itself in order to allow seeking backwards, and the cache is kept in a temporary file.boolean
Returns true if thisSeekable
stream caches data itself in order to allow seeking backwards, and the cache is kept in main memory.protected void
seekImpl
(long pPosition) void
write
(byte[] pBytes, int pOffset, int pLength) void
write
(int pByte) Methods inherited from class com.twelvemonkeys.io.SeekableOutputStream
checkOpen, close, flush, flushBefore, getFlushedPosition, getStreamPosition, mark, reset, seek, write
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Field Details
-
mStream
-
-
Constructor Details
-
OutputStreamView
-
-
Method Details
-
isCached
public boolean isCached()Description copied from interface:Seekable
Returns true if thisSeekable
stream caches data itself in order to allow seeking backwards. Applications may consult this in order to decide how frequently, or whether, to flush in order to conserve cache resources.- Returns:
true
if thisSeekable
caches data.- See Also:
-
isCachedFile
public boolean isCachedFile()Description copied from interface:Seekable
Returns true if thisSeekable
stream caches data itself in order to allow seeking backwards, and the cache is kept in a temporary file. Applications may consult this in order to decide how frequently, or whether, to flush in order to conserve cache resources.- Returns:
true
if thisSeekable
caches data in a temporary file.- See Also:
-
isCachedMemory
public boolean isCachedMemory()Description copied from interface:Seekable
Returns true if thisSeekable
stream caches data itself in order to allow seeking backwards, and the cache is kept in main memory. Applications may consult this in order to decide how frequently, or whether, to flush in order to conserve cache resources.- Returns:
true
if thisSeekable
caches data in main memory.- See Also:
-
closeImpl
- Specified by:
closeImpl
in classSeekableOutputStream
- Throws:
IOException
-
flushBeforeImpl
- Specified by:
flushBeforeImpl
in classSeekableOutputStream
- Throws:
IOException
-
seekImpl
- Specified by:
seekImpl
in classSeekableOutputStream
- Throws:
IOException
-
write
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-