final class FileOperator
extends java.lang.Object
FileChannel may be shared,
each FileOperator should not be.
| Modifier and Type | Field and Description |
|---|---|
private java.nio.channels.FileChannel |
fileChannel |
| Constructor and Description |
|---|
FileOperator(java.nio.channels.FileChannel fileChannel) |
| Modifier and Type | Method and Description |
|---|---|
void |
read(long pos,
okio.Buffer sink,
long byteCount)
Copy
byteCount bytes from the file at pos into to source. |
void |
write(long pos,
okio.Buffer source,
long byteCount)
Write
byteCount bytes from source to the file at pos. |
public void write(long pos,
okio.Buffer source,
long byteCount)
throws java.io.IOException
byteCount bytes from source to the file at pos.java.io.IOExceptionpublic void read(long pos,
okio.Buffer sink,
long byteCount)
throws java.io.IOException
byteCount bytes from the file at pos into to source. It is the
caller's responsibility to make sure there are sufficient bytes to read: if there aren't this
method throws an EOFException.java.io.IOException