public class PacketInfo
extends java.lang.Object
Constructor and Description |
---|
PacketInfo(java.lang.String thisFileName,
int thisPacketSize)
Create a new instance of PacketInfo
|
Modifier and Type | Method and Description |
---|---|
boolean |
closeFileChannel()
Close the file input channel.
|
boolean |
closeFileWriter()
Close the file writer.
|
boolean |
createFile()
Create a file with the name of fileName.
|
void |
deleteFile()
Delete the currently stored file.
|
java.lang.String |
getFileName()
Get the file name.
|
java.io.FileWriter |
getFileWriter()
Get the file writer.
|
java.io.DataInputStream |
getInputStream()
Get the file connection for the current file.
|
java.io.DataOutputStream |
getOutputStream()
Get the file connection for the current file.
|
int |
getPacketSize()
Get the packet size.
|
void |
setFileName(java.lang.String theFileName)
Set the file name.
|
void |
setPacketSize(int thePacketSize)
Set the packet size to the value passed in.
|
public PacketInfo(java.lang.String thisFileName, int thisPacketSize)
thisFileName
- the name of the file to write to.thisPacketSize
- the maximum size of the message packet to send.public void setPacketSize(int thePacketSize)
thePacketSize
- the packet size.public int getPacketSize()
public void setFileName(java.lang.String theFileName)
theFileName
- the file name.public java.lang.String getFileName()
public java.io.FileWriter getFileWriter()
public boolean createFile()
public boolean closeFileWriter()
public void deleteFile()
public java.io.DataInputStream getInputStream() throws java.lang.Exception
java.lang.Exception
- any error.public java.io.DataOutputStream getOutputStream()
public boolean closeFileChannel()