org.jboss.drools.guvnor.importgenerator.utils
Class FileIO
java.lang.Object
org.jboss.drools.guvnor.importgenerator.utils.FileIO
public class FileIO
- extends Object
File IO helper class for reading/writing files and converting to/from base64
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FORMAT
public static final String FORMAT
- See Also:
- Constant Field Values
FileIO
public FileIO()
write
public static void write(String data,
File destination)
throws IOException
- Throws:
IOException
getExtension
public static String getExtension(File file)
readAllAsBase64
public static String readAllAsBase64(File f)
throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
toBase64
public static String toBase64(byte[] b)
throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
fromBase64
public static String fromBase64(byte[] b64)
throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
readAll
public static byte[] readAll(File f)
readAll
public static String readAll(InputStream is)
Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.