|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectau.gov.nehta.vendorlibrary.pcehr.clients.common.util.FileUtils
public final class FileUtils
File handling utilities.
| Method Summary | ||
|---|---|---|
static java.util.Map<java.lang.String,byte[]> |
extractZipEntries(byte[] packageContent)
Read ZIP entries and file content into memory. |
|
static byte[] |
getCdaDocument(byte[] packageContent)
Retrieve root CDA document file content from a CDA package. |
|
static byte[] |
loadFile(java.io.File file)
Load the contents of a file. |
|
static
|
loadXml(java.io.File file,
java.lang.Class<? extends T> clazz)
Load an XML file into a Java object. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static byte[] loadFile(java.io.File file)
throws java.io.IOException
file - File object to load.
java.io.IOException - thrown in the event the file cannot be read in to memory.
public static <T> T loadXml(java.io.File file,
java.lang.Class<? extends T> clazz)
throws javax.xml.bind.JAXBException
file - File object to load.clazz - class to attempt to marshal to.
javax.xml.bind.JAXBException - thrown in the event the file contents cannot be unmarshalled.public static byte[] getCdaDocument(byte[] packageContent)
packageContent - byte array representation of the CDA package.
public static java.util.Map<java.lang.String,byte[]> extractZipEntries(byte[] packageContent)
throws java.io.IOException
packageContent - byte array containing package content.
Map containing list of matching file names and file content byte arrays, or null.
java.io.IOException - Thrown if ZIP I/O operations fail.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||