public class Document extends Object implements Closeable
Represents compared document.
Constructor and Description |
---|
Document(InputStream stream)
Initializes new instance of
Document class. |
Document(InputStream inputStream,
LoadOptions loadOptions) |
Document(InputStream stream,
String password)
Initializes new instance of
Document class. |
Document(Path filePath)
Initializes new instance of
Document class. |
Document(Path filePath,
LoadOptions loadOptions)
Initializes new instance of
Document class. |
Document(Path filePath,
String password)
Initializes new instance of
Document class. |
Document(String filePath)
Initializes new instance of
Document class. |
Document(String filePath,
boolean isLoadText)
Initializes new instance of
Document class. |
Document(String filePath,
LoadOptions loadOptions)
Initializes new instance of
Document class. |
Document(String filePath,
String password)
Initializes new instance of
Document class. |
Modifier and Type | Method and Description |
---|---|
void |
close() |
InputStream |
createStream()
Document stream.
|
void |
generatePreview(PreviewOptions previewOptions)
Generates document pages preview.
|
List<ChangeInfo> |
getChanges()
List of changes.
|
IDocumentInfo |
getDocumentInfo()
Gets information about document - document type, pages count, page sizes etc.
|
FileType |
getFileType() |
String |
getName()
Document name.
|
String |
getPassword()
Document password.
|
long |
getStreamLength() |
void |
setChanges(List<ChangeInfo> value)
List of changes.
|
void |
setFileType(FileType fileType) |
void |
setName(String value)
Document name.
|
public Document(InputStream stream)
Initializes new instance of Document
class.
stream
- Document streampublic Document(InputStream inputStream, LoadOptions loadOptions)
public Document(InputStream stream, String password)
Initializes new instance of Document
class.
stream
- Document streampassword
- Document passwordpublic Document(Path filePath)
Initializes new instance of Document
class.
filePath
- Document pathpublic Document(Path filePath, LoadOptions loadOptions)
Initializes new instance of Document
class.
filePath
- Document pathloadOptions
- Load optionspublic Document(Path filePath, String password)
Initializes new instance of Document
class.
filePath
- Document pathpassword
- Document passwordpublic Document(String filePath)
Initializes new instance of Document
class.
filePath
- Document pathpublic Document(String filePath, boolean isLoadText)
Document
class.filePath
- the file pathisLoadText
- the is load textpublic Document(String filePath, LoadOptions loadOptions)
Initializes new instance of Document
class.
filePath
- Document pathloadOptions
- Load optionspublic void close()
close
in interface Closeable
close
in interface AutoCloseable
public InputStream createStream()
Document stream.
public final void generatePreview(PreviewOptions previewOptions)
Generates document pages preview.
previewOptions
- The document preview optionspublic final List<ChangeInfo> getChanges()
List of changes.
public final IDocumentInfo getDocumentInfo()
Gets information about document - document type, pages count, page sizes etc.
public FileType getFileType()
public final String getName()
Document name.
public String getPassword()
Document password.
public long getStreamLength()
public final void setChanges(List<ChangeInfo> value)
List of changes.
value
- the valuepublic void setFileType(FileType fileType)
public final void setName(String value)
Document name.
value
- the valueCopyright © 2023. All rights reserved.