Package org.apache.flink.core.fs
Class RefCountedFileWithStream
- java.lang.Object
-
- org.apache.flink.core.fs.RefCountedFile
-
- org.apache.flink.core.fs.RefCountedFileWithStream
-
- All Implemented Interfaces:
RefCounted
@Internal public class RefCountedFileWithStream extends RefCountedFile
A reference counted file which is deleted as soon as no caller holds a reference to the wrappedFile.
-
-
Field Summary
-
Fields inherited from class org.apache.flink.core.fs.RefCountedFile
closed
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetLength()OffsetAwareOutputStreamgetStream()static RefCountedFileWithStreamnewFile(File file, OutputStream currentOut)static RefCountedFileWithStreamrestoredFile(File file, OutputStream currentOut, long bytesInCurrentPart)voidwrite(byte[] b, int off, int len)-
Methods inherited from class org.apache.flink.core.fs.RefCountedFile
getFile, getReferenceCounter, release, retain
-
-
-
-
Method Detail
-
getStream
public OffsetAwareOutputStream getStream()
-
getLength
public long getLength()
-
write
public void write(byte[] b, int off, int len) throws IOException- Throws:
IOException
-
newFile
public static RefCountedFileWithStream newFile(File file, OutputStream currentOut) throws IOException
- Throws:
IOException
-
restoredFile
public static RefCountedFileWithStream restoredFile(File file, OutputStream currentOut, long bytesInCurrentPart)
-
-