public class Document extends Object implements Closeable
Represents compared document.
Constructor and Description |
---|
Document(InputStream stream)
Initializes new instance of
Document class. |
Document(InputStream stream,
String password)
Initializes new instance of
Document class. |
Document(Path filePath)
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,
String password)
Initializes new instance of
Document class. |
Modifier and Type | Method and Description |
---|---|
void |
close() |
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.
|
String |
getName()
Document name.
|
String |
getPassword()
Document password.
|
InputStream |
getStream()
Document stream.
|
void |
setChanges(List<ChangeInfo> value)
List of changes.
|
void |
setName(String value)
Document name.
|
public Document(InputStream stream)
Initializes new instance of Document
class.
stream
- Document streampublic 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, 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 void close()
close
in interface Closeable
close
in interface AutoCloseable
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 final String getName()
Document name.
public String getPassword()
Document password.
public InputStream getStream()
Document stream.
public final void setChanges(List<ChangeInfo> value)
List of changes.
value
- the valuepublic final void setName(String value)
Document name.
value
- the value