public class Resourcer extends Object
| 构造器和说明 |
|---|
Resourcer() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
clean_folder(File file) |
static void |
copy_file_to_folder(File srcfile,
File folder) |
static void |
copy_folder_to_folder(File srcfolder,
File folder) |
static void |
delete(File file) |
static void |
mkdir_folder(File file) |
static void |
move_file_to_folder(File srcfile,
File folder) |
static void |
move_folder_to_folder(File srcfolder,
File folder) |
static byte[] |
read_bytes(File file) |
static org.apache.commons.io.LineIterator |
read_line_iterator(File file,
String encoding) |
static List<String> |
read_lines(File file,
String encoding) |
static String |
read_string(File file,
String encoding) |
static byte[] |
to_bytes(InputStream is) |
static byte[] |
to_bytes(InputStream is,
long size) |
static byte[] |
to_bytes(Reader reader) |
static byte[] |
to_bytes(URI uri) |
static byte[] |
to_bytes(URL url) |
static String |
to_string(byte[] bytes,
String encoding) |
static String |
to_string(InputStream is,
String encoding) |
static String |
to_string(Reader reader) |
static String |
to_string(URI uri,
String encoding) |
static String |
to_string(URL url,
String encoding) |
static void |
write_bytes(File file,
byte[] data,
boolean append) |
static void |
write_stream(File file,
InputStream is) |
static void |
write_string(File file,
String data,
String encoding,
boolean append) |
static void |
write_url(File file,
String url,
int conntimeout,
int readtimeout) |
public static String read_string(File file, String encoding) throws IOException
IOExceptionpublic static byte[] read_bytes(File file) throws IOException
IOExceptionpublic static List<String> read_lines(File file, String encoding) throws IOException
IOExceptionpublic static org.apache.commons.io.LineIterator read_line_iterator(File file, String encoding) throws IOException
IOExceptionpublic static void write_string(File file, String data, String encoding, boolean append) throws IOException
IOExceptionpublic static void write_bytes(File file, byte[] data, boolean append) throws IOException
IOExceptionpublic static void write_url(File file, String url, int conntimeout, int readtimeout) throws IOException
IOExceptionpublic static void write_stream(File file, InputStream is) throws IOException
IOExceptionpublic static void copy_file_to_folder(File srcfile, File folder) throws IOException
IOExceptionpublic static void copy_folder_to_folder(File srcfolder, File folder) throws IOException
IOExceptionpublic static void move_file_to_folder(File srcfile, File folder) throws IOException
IOExceptionpublic static void move_folder_to_folder(File srcfolder, File folder) throws IOException
IOExceptionpublic static void delete(File file) throws IOException
IOExceptionpublic static void clean_folder(File file) throws IOException
IOExceptionpublic static void mkdir_folder(File file) throws IOException
IOExceptionpublic static byte[] to_bytes(InputStream is) throws IOException
IOExceptionpublic static byte[] to_bytes(InputStream is, long size) throws IOException
IOExceptionpublic static byte[] to_bytes(Reader reader) throws IOException
IOExceptionpublic static byte[] to_bytes(URL url) throws IOException
IOExceptionpublic static byte[] to_bytes(URI uri) throws IOException
IOExceptionpublic static String to_string(byte[] bytes, String encoding) throws IOException
IOExceptionpublic static String to_string(InputStream is, String encoding) throws IOException
IOExceptionpublic static String to_string(Reader reader) throws IOException
IOExceptionpublic static String to_string(URL url, String encoding) throws IOException
IOExceptionpublic static String to_string(URI uri, String encoding) throws IOException
IOExceptionCopyright (c) 2002-2020 Luther Inc.