com.dynalivery.saffron.client
Class SplittableSaffronInputSource
java.lang.Object
com.dynalivery.saffron.client.SplittableSaffronInputSource
- All Implemented Interfaces:
- SaffronInputSource
- public class SplittableSaffronInputSource
- extends java.lang.Object
- implements SaffronInputSource
|
Method Summary |
int |
getLanguageType()
|
java.awt.print.PageFormat |
getPageFormat(int pageIndex)
Get a PageFormat representing the dimensions of a given page |
boolean |
isPageFormatAvailable(int pageIndex)
Indicates whether the PageFormat for the specified page is known. |
java.io.InputStream[] |
split(int numParts)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SplittableSaffronInputSource
public SplittableSaffronInputSource(int languageType,
java.lang.String fileName)
throws InvalidParameterException,
java.io.FileNotFoundException,
java.io.IOException
- Creates a new instance of SplittableSaffronInputSource
SplittableSaffronInputSource
public SplittableSaffronInputSource(int languageType,
java.io.InputStream is)
throws InvalidParameterException,
java.io.IOException
getPageFormat
public java.awt.print.PageFormat getPageFormat(int pageIndex)
- Description copied from interface:
SaffronInputSource
- Get a PageFormat representing the dimensions of a given page
- Specified by:
getPageFormat in interface SaffronInputSource
- Parameters:
pageIndex - int
Page for which a PageFormat is requested
- Returns:
- If a call to isPageFormatAvailable(pageIndex) would return false
(indicating that the PageFormat for the given page is not available),
then this method returns null. If isPageFormatAvailable(pageIndex)
would return true, then this method either returns a PageFormat
that specifies the dimensions of the specified page or returns null,
indicating that a default page size should be used.
Note that if this method returns null, then the caller may need to
call isPageFormatAvailable(pageIndex) to determine whether this
means that the PageFormat isn't known or that a default should be
used.
isPageFormatAvailable
public boolean isPageFormatAvailable(int pageIndex)
- Description copied from interface:
SaffronInputSource
- Indicates whether the PageFormat for the specified page is known.
If this method returns true, then a call to getPageFormat(pageIndex)
must either return a valid PageFormat, or it must return null
indicating that a default PageFormat should be used for the page
refered to by pageIndex; if this method returns false, then a call
to getPageFormat(pageIndex) must return null.
If it is currently legal for the caller to request that the page
indicated by pageIndex be printed, then this method must return true.
For InputSources using the Printable interface, this means that
PageFormat information must be available for the most recently
printed page and the next page to be printed. For InputSources
using the Pageable interface, PageFormat information must always be
available for every page.
- Specified by:
isPageFormatAvailable in interface SaffronInputSource
- Parameters:
pageIndex - int
- Returns:
- boolean
getLanguageType
public int getLanguageType()
split
public java.io.InputStream[] split(int numParts)
throws java.io.IOException
- Throws:
java.io.IOException