FileDownloadOutputStreampublic class FileDownloadRandomAccessFile extends java.lang.Object implements FileDownloadOutputStream
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
Closes this output stream and releases any system resources associated with this stream.
|
static FileDownloadOutputStream |
create(java.io.File file) |
|
void |
flushAndSync() |
Flush all buffer to system and force all system buffers to synchronize with the underlying
device.
|
void |
seek(long offset) |
Sets the file-pointer offset, measured from the beginning of this file, at which the next
read or write occurs.
|
void |
setLength(long totalBytes) |
Sets the length of this file.
|
void |
write(byte[] b,
int off,
int len) |
Writes
len bytes from the specified byte array
starting at offset off to this file. |
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
FileDownloadOutputStreamlen bytes from the specified byte array
starting at offset off to this file.write in interface FileDownloadOutputStreamjava.io.IOExceptionpublic void flushAndSync()
throws java.io.IOException
FileDownloadOutputStreamflushAndSync in interface FileDownloadOutputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
FileDownloadOutputStreamclose is that it closes the output stream. A closed stream
cannot perform output operations and cannot be reopened.close in interface FileDownloadOutputStreamjava.io.IOExceptionpublic void seek(long offset)
throws java.io.IOException
FileDownloadOutputStreamseek in interface FileDownloadOutputStreamjava.io.IOExceptionpublic void setLength(long totalBytes)
throws java.io.IOException
FileDownloadOutputStreamsetLength in interface FileDownloadOutputStreamjava.io.IOExceptionpublic static FileDownloadOutputStream create(java.io.File file) throws java.io.IOException
java.io.IOException