@Internal public class RefCountedFile extends Object implements RefCounted
File
.Modifier and Type | Method and Description |
---|---|
void |
closeStream() |
void |
flush() |
File |
getFile() |
long |
getLength() |
OffsetAwareOutputStream |
getStream() |
static RefCountedFile |
newFile(File file,
OutputStream currentOut) |
boolean |
release()
Decreases the reference counter.
|
static RefCountedFile |
restoredFile(File file,
OutputStream currentOut,
long bytesInCurrentPart) |
void |
retain()
Increases the reference counter.
|
void |
write(byte[] b,
int off,
int len) |
public File getFile()
public OffsetAwareOutputStream getStream()
public long getLength()
public void write(byte[] b, int off, int len) throws IOException
IOException
public void flush() throws IOException
IOException
public void closeStream()
public void retain()
RefCounted
retain
in interface RefCounted
public boolean release()
RefCounted
release
in interface RefCounted
true
if the reference
counter reached 0, false
otherwise.public static RefCountedFile newFile(File file, OutputStream currentOut) throws IOException
IOException
public static RefCountedFile restoredFile(File file, OutputStream currentOut, long bytesInCurrentPart)
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.