public class Document extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
_asBase64 |
java.time.LocalDate |
LastModified
The last revised/modified date for this file.
|
protected String _asBase64
public java.time.LocalDate LastModified
public Document(byte[] fileBytes,
java.time.LocalDate lastModified)
Document from a file byte[]fileBytes - - The file byte arraylastModified - - The last-revised date for this file.
Per our AUP (https://sovren.com/policies-and-agreements/acceptable-use-policy/), you MUST pass a good-faith last-revised date for every parse transaction.
This is extremely important so that the Parser knows how to interpret dates in the document that are expressed as "current" or "as of" (or similar) to correctly calculate date spans
IllegalArgumentException - If the fileBytes is null or emptypublic Document(String path) throws IOException
Document from a file on the filesystem.
NOTE: this will automatically set the LastModified using Files.getLastModifiedTime(Path, LinkOption...)
If your files do not have an accurate 'LastWrite' or 'LastModified' time, you must use a different constructor
path - - The path to the fileIllegalArgumentException - If the file is emptyIOException - If an error occurs reading the file contentspublic String getAsBase64()
Copyright © 2023. All rights reserved.