org.lobobrowser.util.io

Class IORoutines


public class IORoutines
extends java.lang.Object

Author:
J. H. S.

Field Summary

static byte[]
LINE_BREAK_BYTES

Method Summary

static boolean
equalContent(File file, byte[] content)
static byte[]
load(File file)
static byte[]
load(InputStream in)
static byte[]
load(InputStream in, int initialBufferSize)
static String
loadAsText(InputStream in, String encoding)
static String
loadAsText(InputStream in, String encoding, int bufferSize)
static byte[]
loadExact(InputStream in, int length)
static java.util.List
loadStrings(File file)
static String
readLine(InputStream in)
Reads line without buffering.
static void
save(File file, byte[] content)
static void
saveStrings(File file, java.util.Collection list)
static void
touch(File file)

Field Details

LINE_BREAK_BYTES

public static final byte[] LINE_BREAK_BYTES

Method Details

equalContent

public static boolean equalContent(File file,
                                   byte[] content)
            throws IOException

load

public static byte[] load(File file)
            throws IOException

load

public static byte[] load(InputStream in)
            throws IOException

load

public static byte[] load(InputStream in,
                          int initialBufferSize)
            throws IOException

loadAsText

public static String loadAsText(InputStream in,
                                String encoding)
            throws IOException

loadAsText

public static String loadAsText(InputStream in,
                                String encoding,
                                int bufferSize)
            throws IOException

loadExact

public static byte[] loadExact(InputStream in,
                               int length)
            throws IOException

loadStrings

public static java.util.List loadStrings(File file)
            throws IOException

readLine

public static String readLine(InputStream in)
            throws IOException
Reads line without buffering.

save

public static void save(File file,
                        byte[] content)
            throws IOException

saveStrings

public static void saveStrings(File file,
                               java.util.Collection list)
            throws IOException

touch

public static void touch(File file)