public interface RemoteFile extends RemoteDirectoryEntry
RemoteDirectory
Modifier and Type | Method and Description |
---|---|
void |
appendContents(byte[] data)
Append the data to the file.
|
void |
copy(RemoteFile sourceFile)
Copy from another file to this one.
|
byte[] |
getContents(int offset,
int length)
Read from the file.
|
String |
getNativeHost() |
String |
getNativeName() |
long |
getSize() |
void |
setContents(byte[] data)
Write the data to the file, totally replacing what was there before.
|
destroy, getContainingDirectory, getModificationDate, getName
@Nonnull byte[] getContents(int offset, int length) throws RemoteException, IOException
offset
- Where in the file to read the bytes from.length
- How much of the file to read; -1 for "to the end".RemoteException
- If anything goes wrong with the communication.IOException
- If things go wrong reading the file.void setContents(@Nonnull byte[] data) throws RemoteException, IOException
data
- The literal bytes that will form the new contents of the file.RemoteException
- If anything goes wrong with the communication.IOException
- If things go wrong writing the contents.void appendContents(@Nonnull byte[] data) throws RemoteException, IOException
data
- The literal bytes that will be appended.RemoteException
- If anything goes wrong with the communication.IOException
- If things go wrong writing the contents.long getSize() throws RemoteException
RemoteException
- If anything goes wrong with the communication.void copy(@Nonnull RemoteFile sourceFile) throws RemoteException, IOException
sourceFile
- The other file to copy from.RemoteException
- If anything goes wrong with the communication.IOException
- If things go wrong during the copy.@Nonnull String getNativeName() throws RemoteException
RemoteException
- If anything goes wrong with the communication.@Nonnull String getNativeHost() throws RemoteException
RemoteException
- If anything goes wrong with the communication.Copyright © 2015–2018 The Apache Software Foundation. All rights reserved.