public class MSTDocument extends java.lang.Object implements IMSTFileFormat
| Modifier and Type | Field and Description |
|---|---|
java.io.ByteArrayInputStream |
bin |
static MST.Imaging.Document.MSTech.DocumentServiceProvider |
DocEngine |
java.awt.Image[] |
imageArray |
FileName, FileStream, PageCount, Size, Uri| Constructor and Description |
|---|
MSTDocument()
default constructor
It initializes the MSTImage object and initialize the engine object.
|
| Modifier and Type | Method and Description |
|---|---|
FileFormat |
Detect()
Gives the file format for the corresponding IMSTFileFormat object.
|
boolean |
DropDocument()
All the reference of the corresponding document are made null.
|
boolean |
Export(java.io.FileOutputStream fos,
OutputType outputtype)
Exports the file in specified output type.
|
boolean |
Export(java.io.FileOutputStream fos,
OutputType outputtype,
java.lang.String Annotations,
SAVEOPTION options)
Exports the file in specified output type.
|
boolean |
Export(java.lang.String DestFileName,
OutputType outputtype)
Exports the file in specified output type .
|
boolean |
Export(java.lang.String DestFileName,
OutputType outputtype,
java.lang.String Annotations,
SAVEOPTION options)
Exports the file in specified output type.
|
int |
getCompression()
Gives the value of compression of loaded image.
|
java.lang.String |
getFileName()
Gives the name of the file loaded into the MSTImage object.
|
java.io.InputStream |
getFileStream()
Gives the Inputstream of the file.
|
java.lang.String |
getMimeType(int fileType) |
IMSTPage |
GetPage(int pageNo)
This method loads the page data into the IMSTPage object.
|
IMSTPage |
GetPage(int PageNo,
PageInfo pgInfo)
This method loads the page data into the IMSTPage object with the given parameters in PageInfo.
|
int |
getPageCount()
Gives the number of pages in the file.
|
boolean |
GetPageInfo(int[] pageNo,
PageInfo[] pageInfo)
Gives the information about the given array of pages .
|
boolean |
GetPageInfo(int pageNo,
PageInfo pageInfo)
Gives the information about a specific page .
|
IMSTPage[] |
GetPages(int fromPage,
int toPage,
java.util.List<PageInfo> listPageInfo)
This method loads the page data into the IMSTPage object with the given parameters in PageInfo.
|
int |
getSize()
Gives the size of byte array of the loaded file.
|
boolean |
Load(java.io.InputStream stream)
This method loads the image data into the MSTImage object.
|
boolean |
Load(java.lang.String FileName)
This method loads the image data into the MSTImage object.
|
boolean |
Load(java.net.URI uri)
This method loads the image data into the MSTImage object.
|
public java.awt.Image[] imageArray
public java.io.ByteArrayInputStream bin
public static MST.Imaging.Document.MSTech.DocumentServiceProvider DocEngine
public MSTDocument()
throws java.lang.ClassNotFoundException,
java.lang.IllegalAccessException,
java.lang.InstantiationException,
java.lang.Exception
java.lang.Exceptionjava.lang.InstantiationExceptionjava.lang.IllegalAccessExceptionjava.lang.ClassNotFoundExceptionpublic boolean DropDocument()
IMSTFileFormatDropDocument in interface IMSTFileFormatpublic boolean Load(java.lang.String FileName)
throws MSTException
IMSTFileFormatLoad in interface IMSTFileFormatFileName - Either name or the path of file.MSTExceptionpublic boolean Load(java.io.InputStream stream)
throws MSTException
IMSTFileFormatLoad in interface IMSTFileFormatstream - InputStream object associated with the file that is to be loaded.MSTExceptionpublic boolean Load(java.net.URI uri)
throws MSTException
IMSTFileFormatLoad in interface IMSTFileFormaturi - URI path of the file.MSTExceptionpublic IMSTPage GetPage(int pageNo) throws MSTException
IMSTFileFormatGetPage in interface IMSTFileFormatpageNo - page no of which the page data is to be loaded.MSTExceptionpublic IMSTPage GetPage(int PageNo, PageInfo pgInfo) throws MSTException
IMSTFileFormatGetPage in interface IMSTFileFormatpgInfo - PageInfo Object having parameters as rotate,scale to be applied.MSTExceptionpublic IMSTPage[] GetPages(int fromPage, int toPage, java.util.List<PageInfo> listPageInfo) throws MSTException
IMSTFileFormatGetPages in interface IMSTFileFormatfromPage - Range of pages.toPage - Range of pages.listPageInfo - List having the PageInfo objectsMSTExceptionpublic boolean GetPageInfo(int pageNo,
PageInfo pageInfo)
throws MSTException
IMSTFileFormatGetPageInfo in interface IMSTFileFormatpageNo - page no. of which the information is to be filled into the referenced PageInfo object.pageInfo - PageInfo object reference.MSTExceptionpublic boolean GetPageInfo(int[] pageNo,
PageInfo[] pageInfo)
throws MSTException
IMSTFileFormatGetPageInfo in interface IMSTFileFormatpageNo - page no. of which the information is to be filled into the referenced PageInfo object.pageInfo - PageInfo object reference.MSTExceptionpublic java.lang.String getFileName()
IMSTFileFormatgetFileName in interface IMSTFileFormatpublic java.io.InputStream getFileStream()
IMSTFileFormatgetFileStream in interface IMSTFileFormatpublic int getPageCount()
IMSTFileFormatgetPageCount in interface IMSTFileFormatpublic int getSize()
IMSTFileFormatgetSize in interface IMSTFileFormatpublic java.lang.String getMimeType(int fileType)
public boolean Export(java.lang.String DestFileName,
OutputType outputtype)
throws MSTException
IMSTFileFormatExport in interface IMSTFileFormatDestFileName - name of file in which the file is to be saved.outputtype - MIME type of file which is to be saved.MSTExceptionpublic boolean Export(java.io.FileOutputStream fos,
OutputType outputtype)
throws MSTException
IMSTFileFormatExport in interface IMSTFileFormatfos - streaming file in which output image is saved.outputtype - MIME type of file which is to be saved.MSTExceptionpublic boolean Export(java.lang.String DestFileName,
OutputType outputtype,
java.lang.String Annotations,
SAVEOPTION options)
throws MSTException
IMSTFileFormatExport in interface IMSTFileFormatDestFileName - name of file in which the file is to be saved.outputtype - MIME type of file which is to be saved.Annotations - string contains the data about annotation.options - saving options with specified output type with scaling,bitdepth,rotation,compression,annotation,pageno.MSTExceptionpublic boolean Export(java.io.FileOutputStream fos,
OutputType outputtype,
java.lang.String Annotations,
SAVEOPTION options)
throws MSTException
IMSTFileFormatExport in interface IMSTFileFormatfos - streaming file in which output image is saved.outputtype - MIME type of file which is to be saved.Annotations - string contains the data about annotation.options - saving options with specified output type with scaling,bitdepth,rotation,compression,annotation,pageno.MSTExceptionpublic FileFormat Detect() throws MSTException
IMSTFileFormatDetect in interface IMSTFileFormatMSTExceptionpublic int getCompression()
IMSTFileFormatgetCompression in interface IMSTFileFormat