org.fcrepo.server.security.xacml.util
Class DataFileUtils

java.lang.Object
  extended by org.fcrepo.server.security.xacml.util.DataFileUtils

public class DataFileUtils
extends Object


Constructor Summary
DataFileUtils()
           
 
Method Summary
static byte[] fedoraXMLHashFormat(byte[] data)
           
static String format(byte[] document)
           
static String format(Document doc)
           
static Document getDocumentFromFile(File file)
           
static String getHash(byte[] data)
           
static byte[] loadFile(File file)
           
static byte[] loadFile(String filename)
           
static void saveDocument(String filename, byte[] document)
           
static void saveDocument(String filename, Document doc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataFileUtils

public DataFileUtils()
Method Detail

getDocumentFromFile

public static Document getDocumentFromFile(File file)
                                    throws Exception
Throws:
Exception

loadFile

public static byte[] loadFile(String filename)
                       throws Exception
Throws:
Exception

loadFile

public static byte[] loadFile(File file)
                       throws Exception
Throws:
Exception

saveDocument

public static void saveDocument(String filename,
                                byte[] document)
                         throws Exception
Throws:
Exception

saveDocument

public static void saveDocument(String filename,
                                Document doc)
                         throws Exception
Throws:
Exception

format

public static String format(Document doc)

format

public static String format(byte[] document)
                     throws Exception
Throws:
Exception

fedoraXMLHashFormat

public static byte[] fedoraXMLHashFormat(byte[] data)
                                  throws Exception
Throws:
Exception

getHash

public static String getHash(byte[] data)
                      throws NoSuchAlgorithmException
Throws:
NoSuchAlgorithmException


Copyright © 2012 DuraSpace. All Rights Reserved.