|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.efaxdeveloper.util.outbound.DocumentBundler
public class DocumentBundler
DocumentBundler
Overview
The DocumentBundler is used by the client-side process to bundle all documents for transmission. The programmer will instantiate a DocumentBundler and add each document to the bundle via the object's mutator methods.
The following snippet provides an example of how the DocumentBundler might be used within the client-side process:
// Instantiate a new OutboundRequest object OutboundRequest req = new OutboundRequest(); ... // Instantiate a DocumentBundler object DocumentBundler docs = new DocumentBundler(); // Add document(s) to the DocumentBundler object by path (most common method) docs.add("C:\\your\\document\\path\\your.doc"); // Add a document as a string if you desire to the DocumentBundler object docs.add("This string will be faxed as a separate document", ".txt"); // Add binary large object (BLOB) data as a byte array if desired docs.add(someByteArray[], ".xls"); // Set the documents to be faxed to the OutboundRequest instance req.setDocuments(docs);
OutboundRequest
,
OutboundRequest.setDocuments(DocumentBundler)
Constructor Summary | |
---|---|
DocumentBundler()
Constructor method for DocumentBundler |
Method Summary | |
---|---|
void |
add(byte[] bytes,
java.lang.String fileType)
Method used to Base64 encode and store binary document (BLOB) contents passed as a byte array. |
void |
add(java.lang.String documentPath)
Method used to Base64 encode and store a document file for transmission. |
void |
add(java.lang.String contentString,
java.lang.String fileType)
Method used to Base64 encode and store document contents passed as a string. |
java.util.ArrayList<Base64Doc> |
get()
Method used to retrieve an ArrayList object of documents stored for transmission |
int |
size()
Method used to return the number of documents stored for transmission |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DocumentBundler()
Method Detail |
---|
public void add(byte[] bytes, java.lang.String fileType) throws java.io.IOException
A Binary Large Object or BLOB is a collection of binary data stored as part of a database record.
bytes
- the byte representation of the binary document contents to be encoded and storedfileType
- the file extension of the file to be encoded
java.io.IOException
add(String)
,
add(String, String)
public void add(java.lang.String documentPath) throws java.io.IOException
documentPath
- the physical path to the document file to be encoded and stored
java.io.IOException
add(byte[], String)
,
add(String, String)
public void add(java.lang.String contentString, java.lang.String fileType) throws java.io.IOException
Pre-Base64 encoded contentString arguments can be passed and will be added as entered.
contentString
- the string representation of the document contents to be encoded and storedfileType
- the file extension of the file to be encoded
java.io.IOException
add(String)
,
add(byte[], String)
public java.util.ArrayList<Base64Doc> get()
public int size()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |