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 inputStream) |
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 inputStream) |
String |
extractText(InputStream inputStream,
int maxStringLength) |
String |
getAbsolutePath(File file) |
byte[] |
getBytes(Class<?> clazz,
String fileName) |
byte[] |
getBytes(File file) |
byte[] |
getBytes(InputStream inputStream) |
byte[] |
getBytes(InputStream inputStream,
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 |
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 fileInputStream) |
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 inputStream) |
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 inputStream) |
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) |
String appendParentheticalSuffix(String fileName,
String suffix)
String appendSuffix(String fileName,
String suffix)
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 inputStream)
throws IOException
IOExceptionFile createTempFile(String extension)
File createTempFile(String prefix,
String extension)
String createTempFileName()
String createTempFileName(String extension)
String createTempFileName(String prefix,
String extension)
File createTempFolder()
throws IOException
IOExceptionString 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 inputStream)
String extractText(InputStream inputStream,
int maxStringLength)
String getAbsolutePath(File file)
byte[] getBytes(Class<?> clazz,
String fileName)
throws IOException
IOExceptionbyte[] getBytes(File file)
throws IOException
IOExceptionbyte[] getBytes(InputStream inputStream)
throws IOException
IOExceptionbyte[] getBytes(InputStream inputStream,
int bufferSize)
throws IOException
IOExceptionbyte[] getBytes(InputStream inputStream,
int bufferSize,
boolean cleanUpStream)
throws IOException
IOExceptionString getExtension(String fileName)
String getMD5Checksum(File file)
throws IOException
IOExceptionString getPath(String fullFileName)
String getShortFileName(String fullFileName)
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)
throws IOException
IOExceptionvoid mkdirs(String pathName)
boolean move(File source,
File destination)
boolean move(String sourceFileName,
String destinationFileName)
String read(File file)
throws IOException
IOExceptionString read(File file,
boolean raw)
throws IOException
IOExceptionString read(String fileName)
throws IOException
IOExceptionString 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 fileInputStream)
Properties toProperties(String fileName)
void touch(File file)
throws IOException
IOExceptionvoid touch(String fileName)
throws IOException
IOExceptionvoid unzip(File source,
File destination)
void 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 inputStream)
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 inputStream)
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