public class FileIO
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static int |
BLKSIZ
The size of blocking to use
|
Modifier and Type | Method and Description |
---|---|
static void |
copyFile(java.io.InputStream is,
java.io.OutputStream os,
boolean close)
Copy file from InputStream to OutputStream
|
static void |
copyFile(java.io.Reader is,
java.io.Writer os,
boolean close)
Copy file from Reader to Writer
|
static void |
copyFile(java.lang.String inName,
java.io.PrintWriter pw,
boolean close)
Copy file from File specified by name to PrintWrite
|
static void |
copyFile(java.lang.String inName,
java.lang.String outName)
Copy file using file names
|
void |
copyFileBuffered(java.lang.String inName,
java.lang.String outName)
Copy a data file from one filename to another, alternate method.
|
static java.lang.String |
inputStreamToString(java.io.InputStream is)
Read the content of a Stream into a String
|
static java.io.BufferedReader |
openFile(java.lang.String fileName)
Open a BufferedReader from a named file.
|
static java.lang.String |
readerToString(java.io.Reader is)
Read the entire content of a Reader into a String
|
static java.lang.String |
readLine(java.lang.String inName)
Open a File and read first line of it
|
static void |
stringToFile(java.lang.String text,
java.lang.String fileName)
Write a String as the entire content of a File
|
protected static final int BLKSIZ
public static void copyFile(java.lang.String inName, java.lang.String outName) throws java.io.FileNotFoundException, java.io.IOException
inName
- outName
- java.io.FileNotFoundException
java.io.IOException
public static void copyFile(java.io.InputStream is, java.io.OutputStream os, boolean close) throws java.io.IOException
is
- os
- close
- java.io.IOException
public static void copyFile(java.io.Reader is, java.io.Writer os, boolean close) throws java.io.IOException
is
- os
- close
- java.io.IOException
public static void copyFile(java.lang.String inName, java.io.PrintWriter pw, boolean close) throws java.io.FileNotFoundException, java.io.IOException
inName
- pw
- close
- java.io.FileNotFoundException
java.io.IOException
public static java.lang.String readLine(java.lang.String inName) throws java.io.FileNotFoundException, java.io.IOException
inName
- java.io.FileNotFoundException
java.io.IOException
public void copyFileBuffered(java.lang.String inName, java.lang.String outName) throws java.io.FileNotFoundException, java.io.IOException
inName
- outName
- java.io.FileNotFoundException
java.io.IOException
public static java.lang.String readerToString(java.io.Reader is) throws java.io.IOException
is
- java.io.IOException
public static java.lang.String inputStreamToString(java.io.InputStream is) throws java.io.IOException
is
- java.io.IOException
public static void stringToFile(java.lang.String text, java.lang.String fileName) throws java.io.IOException
text
- fileName
- java.io.IOException
public static java.io.BufferedReader openFile(java.lang.String fileName) throws java.io.IOException
fileName
- java.io.IOException
JCSC is released under the terms of the GNU General Public License