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.Exception
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.ClassNotFoundException
public boolean DropDocument()
IMSTFileFormat
DropDocument
in interface IMSTFileFormat
public boolean Load(java.lang.String FileName) throws MSTException
IMSTFileFormat
Load
in interface IMSTFileFormat
FileName
- Either name or the path of file.MSTException
public boolean Load(java.io.InputStream stream) throws MSTException
IMSTFileFormat
Load
in interface IMSTFileFormat
stream
- InputStream object associated with the file that is to be loaded.MSTException
public boolean Load(java.net.URI uri) throws MSTException
IMSTFileFormat
Load
in interface IMSTFileFormat
uri
- URI path of the file.MSTException
public IMSTPage GetPage(int pageNo) throws MSTException
IMSTFileFormat
GetPage
in interface IMSTFileFormat
pageNo
- page no of which the page data is to be loaded.MSTException
public IMSTPage GetPage(int PageNo, PageInfo pgInfo) throws MSTException
IMSTFileFormat
GetPage
in interface IMSTFileFormat
pgInfo
- PageInfo Object having parameters as rotate,scale to be applied.MSTException
public IMSTPage[] GetPages(int fromPage, int toPage, java.util.List<PageInfo> listPageInfo) throws MSTException
IMSTFileFormat
GetPages
in interface IMSTFileFormat
fromPage
- Range of pages.toPage
- Range of pages.listPageInfo
- List having the PageInfo objectsMSTException
public boolean GetPageInfo(int pageNo, PageInfo pageInfo) throws MSTException
IMSTFileFormat
GetPageInfo
in interface IMSTFileFormat
pageNo
- page no. of which the information is to be filled into the referenced PageInfo object.pageInfo
- PageInfo object reference.MSTException
public boolean GetPageInfo(int[] pageNo, PageInfo[] pageInfo) throws MSTException
IMSTFileFormat
GetPageInfo
in interface IMSTFileFormat
pageNo
- page no. of which the information is to be filled into the referenced PageInfo object.pageInfo
- PageInfo object reference.MSTException
public java.lang.String getFileName()
IMSTFileFormat
getFileName
in interface IMSTFileFormat
public java.io.InputStream getFileStream()
IMSTFileFormat
getFileStream
in interface IMSTFileFormat
public int getPageCount()
IMSTFileFormat
getPageCount
in interface IMSTFileFormat
public int getSize()
IMSTFileFormat
getSize
in interface IMSTFileFormat
public java.lang.String getMimeType(int fileType)
public boolean Export(java.lang.String DestFileName, OutputType outputtype) throws MSTException
IMSTFileFormat
Export
in interface IMSTFileFormat
DestFileName
- name of file in which the file is to be saved.outputtype
- MIME type of file which is to be saved.MSTException
public boolean Export(java.io.FileOutputStream fos, OutputType outputtype) throws MSTException
IMSTFileFormat
Export
in interface IMSTFileFormat
fos
- streaming file in which output image is saved.outputtype
- MIME type of file which is to be saved.MSTException
public boolean Export(java.lang.String DestFileName, OutputType outputtype, java.lang.String Annotations, SAVEOPTION options) throws MSTException
IMSTFileFormat
Export
in interface IMSTFileFormat
DestFileName
- 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.MSTException
public boolean Export(java.io.FileOutputStream fos, OutputType outputtype, java.lang.String Annotations, SAVEOPTION options) throws MSTException
IMSTFileFormat
Export
in interface IMSTFileFormat
fos
- 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.MSTException
public FileFormat Detect() throws MSTException
IMSTFileFormat
Detect
in interface IMSTFileFormat
MSTException
public int getCompression()
IMSTFileFormat
getCompression
in interface IMSTFileFormat