|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSCCT.JavaSubscriber.SCCT_AbstractPackage
SCCT.JavaSubscriber.SCCT_AbstractDataPackage
SCCT.JavaSubscriber.SCCT_FilePackage
public class SCCT_FilePackage
This class represents a file package. *This class is available only in PRO version.*
Constructor Summary | |
---|---|
SCCT_FilePackage(java.io.File file,
boolean md5)
|
|
SCCT_FilePackage(java.io.File file,
java.lang.String[] attributes,
boolean md5)
|
|
SCCT_FilePackage(java.lang.String fileName,
byte[] file,
java.lang.String[] attributes,
boolean md5)
|
Method Summary | |
---|---|
java.lang.String[] |
getAttributes()
Gets an array of attributes associated with the file. |
byte[] |
getBytes()
Gets a sequence of bytes that represents the file. |
java.lang.String |
getFileName()
Gets the name of the content file. |
java.lang.String |
getMd5()
Gets the md5 of the content file. |
java.io.File |
saveFile()
By default the file is saved in the same directory in which the program is running. |
java.io.File |
saveFile(java.lang.String path)
By default if a file with the same name already exsists it is overwritten. |
java.io.File |
saveFile(java.lang.String path,
boolean append)
|
Methods inherited from class SCCT.JavaSubscriber.SCCT_AbstractDataPackage |
---|
getSourceDescription, getSourceId |
Methods inherited from class SCCT.JavaSubscriber.SCCT_AbstractPackage |
---|
getCalendar, getPackageNumber |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SCCT_FilePackage(java.lang.String fileName, byte[] file, java.lang.String[] attributes, boolean md5)
fileName
- It's the name of the file.file
- It's the file in a byte array.attributes
- It's the array of attributes to send with the file.md5
- Suggests if calculate the md5 code of file.public SCCT_FilePackage(java.io.File file, java.lang.String[] attributes, boolean md5) throws java.io.IOException
file
- It's a File object of java.io package that represents the file to send.attributes
- It's the array of attributes to send with the file.md5
- Suggests if calculate the md5 code of file.
java.io.IOException
- If an error occurs, in order to open the file.public SCCT_FilePackage(java.io.File file, boolean md5) throws java.io.IOException
file
- It's a File object of java.io package that represent the file to send.md5
- Suggests if calculate the md5 code of file.
java.io.IOException
- If an error occurs, in order to open the file.Method Detail |
---|
public java.lang.String getFileName()
public java.lang.String getMd5()
public byte[] getBytes()
public java.lang.String[] getAttributes()
public java.io.File saveFile(java.lang.String path, boolean append) throws java.io.IOException
path
- The relative or absolute path where save the file.append
- If true, then bytes will be written to the end of the file rather than the beginning.
java.io.IOException
- If an error occurs, in order to save the file.public java.io.File saveFile(java.lang.String path) throws java.io.IOException
path
- The relative or absolute path where save the file.java.io.IOException
- If an error occurs, in order to save the file.public java.io.File saveFile() throws java.io.IOException
java.io.IOException
- If an error occurs, in order to save the file.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |