public class PutFileReq extends Message
Constructor and Description |
---|
PutFileReq()
Create an empty request for file write.
|
PutFileReq(AgentID to)
Create an empty request for file write.
|
PutFileReq(AgentID to,
java.lang.String filename,
byte[] contents)
Create request for file write.
|
PutFileReq(AgentID to,
java.lang.String filename,
byte[] contents,
long ofs)
Create request for file write.
|
PutFileReq(java.lang.String filename,
byte[] contents)
Create request for file write.
|
PutFileReq(java.lang.String filename,
byte[] contents,
long ofs)
Create request for file write.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getContents()
Get the contents to write to the file.
|
java.lang.String |
getFilename()
Get the name of the file.
|
long |
getOffset()
Get the start location in file to write to.
|
void |
setContents(byte[] contents)
Set the contents to write to the file.
|
void |
setFilename(java.lang.String filename)
Set the name of the file.
|
void |
setOffset(long ofs)
Set the start location in file to write from.
|
getInReplyTo, getJsonCache, getMessageID, getPerformative, getRecipient, getSender, getSentAt, setInReplyTo, setJsonCache, setMessageID, setPerformative, setRecipient, setSender, setSentAt, toString
public PutFileReq()
public PutFileReq(AgentID to)
to
- shell agent id.public PutFileReq(java.lang.String filename, byte[] contents)
filename
- name of the file to write.contents
- contents to write to the file (null to delete file).public PutFileReq(java.lang.String filename, byte[] contents, long ofs)
filename
- name of the file to write.contents
- contents to write to the file (null to delete file).ofs
- offset within the file to write the contents topublic PutFileReq(AgentID to, java.lang.String filename, byte[] contents)
to
- shell agent id.filename
- name of the file to write.contents
- contents to write to the file (null to delete file).public PutFileReq(AgentID to, java.lang.String filename, byte[] contents, long ofs)
to
- shell agent id.filename
- name of the file to write.contents
- contents to write to the file (null to delete file).ofs
- offset within the file to write the contents to.public java.lang.String getFilename()
public void setFilename(java.lang.String filename)
filename
- name of the file.public byte[] getContents()
public void setContents(byte[] contents)
contents
- the contents to write to the file (null to delete file).public long getOffset()
public void setOffset(long ofs)
ofs
- start location in file (negative for offset relative to end of file).