public interface File
| Modifier and Type | Method and Description |
|---|---|
String |
appendParentheticalSuffix(String fileName,
String suffix) |
String |
appendSuffix(String fileName,
String suffix) |
void |
copyDirectory(File source,
File destination) |
void |
copyDirectory(String sourceDirName,
String destinationDirName) |
void |
copyFile(File source,
File destination) |
void |
copyFile(File source,
File destination,
boolean lazy) |
void |
copyFile(String source,
String destination) |
void |
copyFile(String source,
String destination,
boolean lazy) |
File |
createTempFile() |
File |
createTempFile(byte[] bytes) |
File |
createTempFile(InputStream is) |
File |
createTempFile(String extension) |
File |
createTempFile(String prefix,
String extension) |
String |
createTempFileName() |
String |
createTempFileName(String extension) |
String |
createTempFileName(String prefix,
String extension) |
File |
createTempFolder() |
String |
decodeSafeFileName(String fileName) |
boolean |
delete(File file) |
boolean |
delete(String file) |
void |
deltree(File directory) |
void |
deltree(String directory) |
String |
encodeSafeFileName(String fileName) |
boolean |
exists(File file) |
boolean |
exists(String fileName) |
String |
extractText(InputStream is,
String fileName) |
String |
extractText(InputStream is,
String fileName,
int maxStringLength) |
String[] |
find(String directory,
String includes,
String excludes) |
String |
getAbsolutePath(File file) |
byte[] |
getBytes(Class<?> clazz,
String fileName) |
byte[] |
getBytes(File file) |
byte[] |
getBytes(InputStream is) |
byte[] |
getBytes(InputStream is,
int bufferSize) |
byte[] |
getBytes(InputStream inputStream,
int bufferSize,
boolean cleanUpStream) |
String |
getExtension(String fileName) |
String |
getMD5Checksum(File file) |
String |
getPath(String fullFileName) |
String |
getShortFileName(String fullFileName) |
boolean |
isAscii(File file) |
boolean |
isSameContent(File file,
byte[] bytes,
int length) |
boolean |
isSameContent(File file,
String s) |
String[] |
listDirs(File file) |
String[] |
listDirs(String fileName) |
String[] |
listFiles(File file) |
String[] |
listFiles(String fileName) |
void |
mkdirs(File file) |
void |
mkdirs(String pathName) |
boolean |
move(File source,
File destination) |
boolean |
move(String sourceFileName,
String destinationFileName) |
String |
read(File file) |
String |
read(File file,
boolean raw) |
String |
read(String fileName) |
String |
replaceSeparator(String fileName) |
File[] |
sortFiles(File[] files) |
String |
stripExtension(String fileName) |
String |
stripParentheticalSuffix(String fileName) |
List<String> |
toList(Reader reader) |
List<String> |
toList(String fileName) |
Properties |
toProperties(FileInputStream fis) |
Properties |
toProperties(String fileName) |
void |
touch(File file) |
void |
touch(String fileName) |
void |
unzip(File source,
File destination) |
void |
write(File file,
byte[] bytes) |
void |
write(File file,
byte[] bytes,
boolean append) |
void |
write(File file,
byte[] bytes,
int offset,
int length) |
void |
write(File file,
byte[] bytes,
int offset,
int length,
boolean append) |
void |
write(File file,
InputStream is) |
void |
write(File file,
String s) |
void |
write(File file,
String s,
boolean lazy) |
void |
write(File file,
String s,
boolean lazy,
boolean append) |
void |
write(String fileName,
byte[] bytes) |
void |
write(String fileName,
InputStream is) |
void |
write(String fileName,
String s) |
void |
write(String fileName,
String s,
boolean lazy) |
void |
write(String fileName,
String s,
boolean lazy,
boolean append) |
void |
write(String pathName,
String fileName,
String s) |
void |
write(String pathName,
String fileName,
String s,
boolean lazy) |
void |
write(String pathName,
String fileName,
String s,
boolean lazy,
boolean append) |
void copyDirectory(File source, File destination) throws IOException
IOExceptionvoid copyDirectory(String sourceDirName, String destinationDirName) throws IOException
IOExceptionvoid copyFile(File source, File destination) throws IOException
IOExceptionvoid copyFile(File source, File destination, boolean lazy) throws IOException
IOExceptionvoid copyFile(String source, String destination) throws IOException
IOExceptionvoid copyFile(String source, String destination, boolean lazy) throws IOException
IOExceptionFile createTempFile()
File createTempFile(byte[] bytes) throws IOException
IOExceptionFile createTempFile(InputStream is) throws IOException
IOExceptionString createTempFileName()
File createTempFolder() throws IOException
IOExceptionboolean delete(File file)
boolean delete(String file)
void deltree(File directory)
void deltree(String directory)
boolean exists(File file)
boolean exists(String fileName)
String extractText(InputStream is, String fileName)
String extractText(InputStream is, String fileName, int maxStringLength)
byte[] getBytes(Class<?> clazz, String fileName) throws IOException
IOExceptionbyte[] getBytes(InputStream is) throws IOException
IOExceptionbyte[] getBytes(InputStream is, int bufferSize) throws IOException
IOExceptionbyte[] getBytes(InputStream inputStream, int bufferSize, boolean cleanUpStream) throws IOException
IOExceptionbyte[] getBytes(File file) throws IOException
IOExceptionString getMD5Checksum(File file) throws IOException
IOExceptionboolean isAscii(File file) throws IOException
IOExceptionboolean isSameContent(File file, byte[] bytes, int length)
void mkdirs(File file) throws IOException
IOExceptionvoid mkdirs(String pathName)
String read(File file) throws IOException
IOExceptionString read(File file, boolean raw) throws IOException
IOExceptionString read(String fileName) throws IOException
IOExceptionProperties toProperties(FileInputStream fis)
Properties toProperties(String fileName)
void touch(File file) throws IOException
IOExceptionvoid touch(String fileName) throws IOException
IOExceptionvoid write(File file, byte[] bytes) throws IOException
IOExceptionvoid write(File file, byte[] bytes, boolean append) throws IOException
IOExceptionvoid write(File file, byte[] bytes, int offset, int length) throws IOException
IOExceptionvoid write(File file, byte[] bytes, int offset, int length, boolean append) throws IOException
IOExceptionvoid write(File file, InputStream is) throws IOException
IOExceptionvoid write(File file, String s) throws IOException
IOExceptionvoid write(File file, String s, boolean lazy) throws IOException
IOExceptionvoid write(File file, String s, boolean lazy, boolean append) throws IOException
IOExceptionvoid write(String fileName, byte[] bytes) throws IOException
IOExceptionvoid write(String fileName, InputStream is) throws IOException
IOExceptionvoid write(String fileName, String s) throws IOException
IOExceptionvoid write(String fileName, String s, boolean lazy) throws IOException
IOExceptionvoid write(String fileName, String s, boolean lazy, boolean append) throws IOException
IOExceptionvoid write(String pathName, String fileName, String s) throws IOException
IOExceptionvoid write(String pathName, String fileName, String s, boolean lazy) throws IOException
IOExceptionvoid write(String pathName, String fileName, String s, boolean lazy, boolean append) throws IOException
IOException