public abstract class OutputFileSet extends Object
Modifier and Type | Field and Description |
---|---|
static int |
TIMESTAMP_UNAVAILABLE
Indicates that the file should be overwritten.
|
Modifier | Constructor and Description |
---|---|
protected |
OutputFileSet(String pathDescription) |
Modifier and Type | Method and Description |
---|---|
abstract void |
close()
No more output will be sent to this OutputFileSet.
|
protected abstract OutputStream |
createNewOutputStream(String path,
long lastModifiedTime) |
String |
getPathDescription()
Return a description of this output file set's path.
|
OutputStream |
openForWrite(String path)
Opens a file for write.
|
OutputStream |
openForWrite(String path,
long timeStampMillis)
Opens a file for write.
|
public static final int TIMESTAMP_UNAVAILABLE
protected OutputFileSet(String pathDescription)
public abstract void close() throws IOException
close()
on an already-closed instance.IOException
public String getPathDescription()
public final OutputStream openForWrite(String path) throws IOException
IOException
public OutputStream openForWrite(String path, long timeStampMillis) throws IOException
timeStampMillis
- last modified time in milliseconds, or
TIMESTAMP_UNAVAILABLE to force an overwrite.IOException
protected abstract OutputStream createNewOutputStream(String path, long lastModifiedTime) throws IOException
IOException
Copyright © 2018. All rights reserved.