com.efaxdeveloper.util.outbound
Class Base64Doc

java.lang.Object
  extended by com.efaxdeveloper.util.outbound.Base64Doc

public class Base64Doc
extends java.lang.Object

Base64Doc

Overview

This utility class can be used if retrieving encoded documents from the DocumentBundler is ever desired by the client-side process.

The following snippet provides an example of how the Base64Doc class might be used within the client-side process:

   // Instantiate a DocumentBundler object
   DocumentBundler docs = new DocumentBundler();

   // Add document(s) to the DocumentBundler object by path
   docs.add("C:\\your\\document\\path\\your.doc");

   // Establish a null Base64Doc reference
   Base64Doc b64Doc = null;

   // Retrieve an ArrayList of Base64Doc objects from the DocumentBundler   
   ArrayList<Base64Doc> list = new ArrayList<Base64Doc>(docs.get());

   // Establish an Iterator    
   Iterator<Base64Doc> iterator = list.iterator();

   // Spin through the ArrayList of Base64Doc objects   
   while (iterator.hasNext()) {
     // Retrieve a Base64Doc object from the ArrayList
     b64Doc = new Base64Doc(iterator.next());
     // Display the Base64 encoded string
     System.out.println(b64Doc.getB64Document());
     // Display the file extension
     System.out.println(b64Doc.getExtenstion());
   }
   
 

Since:
1.0
Version:
2.0
See Also:
DocumentBundler.get()

Constructor Summary
Base64Doc()
          Constructor method for Base64Doc
Base64Doc(Base64Doc b64Doc)
          Copy constructor method for Base64Doc
 
Method Summary
 java.lang.String getB64Document()
          Method used to retrieve the Base64 encoded document text string.
 java.lang.String getExtenstion()
          Method used to retrieve the documents extension.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Base64Doc

public Base64Doc()
Constructor method for Base64Doc


Base64Doc

public Base64Doc(Base64Doc b64Doc)
Copy constructor method for Base64Doc

Parameters:
b64Doc - an existing Base64Doc instance
Method Detail

getB64Document

public java.lang.String getB64Document()
Method used to retrieve the Base64 encoded document text string.

Returns:
the Base64 encoded document text string

getExtenstion

public java.lang.String getExtenstion()
Method used to retrieve the documents extension.

Returns:
the documents extension