public class YonderClient extends TcpSocketClient
Copyright 2004-2007 Partner Software, Inc.
| Constructor and Description |
|---|
YonderClient(java.lang.String serverName) |
| Modifier and Type | Method and Description |
|---|---|
void |
close(int fileId)
Closes the remote file with the given ID.
|
void |
connect(boolean resolveHostName)
Connect to the YonderServer.
|
void |
disconnect()
Disconnect from the YonderServer.
|
long |
getLength(int fileId) |
YonderFileInfo |
infoFor(Path path)
Requests information about a file.
|
YonderFileInfo[] |
listFilesIn(Path dirPath)
List contents of remote directory.
|
void |
makeDirectory(Path path) |
int |
open(Path path,
java.lang.String mode)
Opens the file at the given path, returning an integer ID that will be
used to refer to it henceforth.
|
int |
read(int fileId,
long position,
byte[] bytes,
int offset,
int length)
Reads from the given location in the given open file.
|
int |
readCompressed(int fileId,
long position,
byte[] bytes,
int offset,
int length)
Reads from the given location in the given open file, compressing the bytes transferred.
|
void |
remove(Path path) |
void |
setLength(int fileId,
long newLength) |
void |
write(int fileId,
long position,
byte[] bytes,
int offset,
int length)
Writes to the given location in the given open file.
|
void |
writeCompressed(int fileId,
long position,
byte[] bytes,
int offset,
int length)
Writes to the given location in the given open file.
|
connect, getInputStream, getMeterPerformance, getName, getOutputStream, getServerName, getServerPortNumber, getSocket, setMeterPerformancepublic void connect(boolean resolveHostName)
throws java.io.IOException
connect in class TcpSocketClientjava.io.IOExceptionpublic void disconnect()
throws java.io.IOException
disconnect in class TcpSocketClientjava.io.IOExceptionpublic YonderFileInfo infoFor(Path path) throws java.io.IOException
java.io.IOExceptionpublic YonderFileInfo[] listFilesIn(Path dirPath) throws java.io.IOException
java.io.IOExceptionpublic void makeDirectory(Path path) throws java.io.IOException
java.io.IOExceptionpublic void remove(Path path) throws java.io.IOException
java.io.IOExceptionpublic int open(Path path, java.lang.String mode) throws java.io.IOException
java.io.IOExceptionpublic void close(int fileId)
throws java.io.IOException
fileId - java.io.IOExceptionpublic int read(int fileId,
long position,
byte[] bytes,
int offset,
int length)
throws java.io.IOException
fileId - position - java.io.IOExceptionpublic void write(int fileId,
long position,
byte[] bytes,
int offset,
int length)
throws java.io.IOException
java.io.IOExceptionpublic int readCompressed(int fileId,
long position,
byte[] bytes,
int offset,
int length)
throws java.io.IOException
fileId - position - java.io.IOExceptionpublic void writeCompressed(int fileId,
long position,
byte[] bytes,
int offset,
int length)
throws java.io.IOException
java.io.IOExceptionpublic void setLength(int fileId,
long newLength)
throws java.io.IOException
java.io.IOExceptionpublic long getLength(int fileId)
throws java.io.IOException
java.io.IOException