public class GetFileReq extends Message
Constructor and Description |
---|
GetFileReq()
Create an empty request for file/directory.
|
GetFileReq(AgentID to)
Create an empty request for file/directory.
|
GetFileReq(AgentID to,
java.lang.String filename)
Create request for file/directory.
|
GetFileReq(AgentID to,
java.lang.String filename,
long ofs,
long len)
Create request for partial file.
|
GetFileReq(java.lang.String filename)
Create request for file/directory.
|
GetFileReq(java.lang.String filename,
long ofs,
long len)
Create request for partial file.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getFilename()
Get the name of the file/directory.
|
long |
getLength()
Get number of bytes to read from file.
|
long |
getOffset()
Get the start location in file to read from.
|
void |
setFilename(java.lang.String filename)
Set the name of the file/directory.
|
void |
setLength(long len)
Set number of bytes to read from file.
|
void |
setOffset(long ofs)
Set the start location in file to read from.
|
getInReplyTo, getJsonCache, getMessageID, getPerformative, getRecipient, getSender, getSentAt, setInReplyTo, setJsonCache, setMessageID, setPerformative, setRecipient, setSender, setSentAt, toString
public GetFileReq()
public GetFileReq(AgentID to)
to
- shell agent id.public GetFileReq(java.lang.String filename)
filename
- name of the file/directory to read.public GetFileReq(AgentID to, java.lang.String filename)
to
- shell agent id.filename
- name of the file/directory to read.public GetFileReq(java.lang.String filename, long ofs, long len)
filename
- name of the file/directory to read.ofs
- start location in file (negative for offset relative to end of file).len
- maximum number of bytes to read (0 for unlimited).public GetFileReq(AgentID to, java.lang.String filename, long ofs, long len)
to
- shell agent id.filename
- name of the file/directory to read.ofs
- start location in file (negative for offset relative to end of file).len
- maximum number of bytes to read (0 for unlimited).public java.lang.String getFilename()
public void setFilename(java.lang.String filename)
filename
- name of the file/directory.public long getOffset()
public void setOffset(long ofs)
ofs
- start location in file (negative for offset relative to end of file).public long getLength()
public void setLength(long len)
len
- number of bytes to read, 0 for no limit.