@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
IOExceptionpublic void flush()
throws IOException
IOExceptionpublic void closeStream()
public void retain()
RefCountedretain in interface RefCountedpublic boolean release()
RefCountedrelease in interface RefCountedtrue if the reference
counter reached 0, false otherwise.public static RefCountedFile newFile(File file, OutputStream currentOut) throws IOException
IOExceptionpublic static RefCountedFile restoredFile(File file, OutputStream currentOut, long bytesInCurrentPart)
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.