|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.h2.samples.FileFunctions
public class FileFunctions
This sample application shows how to create a user defined function to read a file from the file system.
| Constructor Summary | |
|---|---|
FileFunctions()
|
|
| Method Summary | |
|---|---|
static void |
main(java.lang.String... args)
This method is called when executing this sample application from the command line. |
static byte[] |
readFile(java.lang.String fileName)
Read a file into a byte array. |
static java.lang.String |
readTextFile(java.lang.String fileName)
Read a String from a file. |
static java.lang.String |
readTextFileWithEncoding(java.lang.String fileName,
java.lang.String encoding)
Read a String from a file using the specified encoding. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileFunctions()
| Method Detail |
|---|
public static void main(java.lang.String... args)
throws java.lang.Exception
args - the command line parameters
java.lang.Exception
public static java.lang.String readTextFile(java.lang.String fileName)
throws java.io.IOException
fileName - the file name
java.io.IOException
public static java.lang.String readTextFileWithEncoding(java.lang.String fileName,
java.lang.String encoding)
throws java.io.IOException
fileName - the file nameencoding - the encoding
java.io.IOException
public static byte[] readFile(java.lang.String fileName)
throws java.io.IOException
fileName - the file name
java.io.IOException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||