Package com.google.common.jimfs
Class JimfsOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- com.google.common.jimfs.JimfsOutputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
final class JimfsOutputStream extends java.io.OutputStreamOutputStreamfor writing to aRegularFile.
-
-
Field Summary
Fields Modifier and Type Field Description private booleanappend(package private) RegularFilefileprivate FileSystemStatefileSystemStateprivate longpos
-
Constructor Summary
Constructors Constructor Description JimfsOutputStream(RegularFile file, boolean append, FileSystemState fileSystemState)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidcheckNotClosed()voidclose()private booleanisOpen()voidwrite(byte[] b)voidwrite(byte[] b, int off, int len)voidwrite(int b)private voidwriteInternal(byte[] b, int off, int len)
-
-
-
Field Detail
-
file
RegularFile file
-
pos
private long pos
-
append
private final boolean append
-
fileSystemState
private final FileSystemState fileSystemState
-
-
Constructor Detail
-
JimfsOutputStream
JimfsOutputStream(RegularFile file, boolean append, FileSystemState fileSystemState)
-
-
Method Detail
-
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) throws java.io.IOException- Overrides:
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
-
writeInternal
private void writeInternal(byte[] b, int off, int len) throws java.io.IOException- Throws:
java.io.IOException
-
checkNotClosed
private void checkNotClosed() throws java.io.IOException- 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
-
isOpen
private boolean isOpen()
-
-