Package com.liferay.portal.util
Class FileImpl
Object
com.liferay.portal.util.FileImpl
- All Implemented Interfaces:
com.liferay.portal.kernel.util.File
- Author:
- Brian Wing Shun Chan, Alexander Chow
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappendParentheticalSuffix
(String fileName, String suffix) appendSuffix
(String fileName, String suffix) void
copyDirectory
(File source, File destination) void
copyDirectory
(String sourceDirName, String destinationDirName) void
void
createTempFile
(byte[] bytes) createTempFile
(InputStream inputStream) createTempFile
(String extension) createTempFile
(String prefix, String extension) createTempFileName
(String extension) createTempFileName
(String prefix, String extension) decodeSafeFileName
(String fileName) boolean
boolean
void
void
encodeSafeFileName
(String fileName) boolean
boolean
getAbsolutePath
(File file) byte[]
byte[]
getBytes
(InputStream inputStream) byte[]
getBytes
(InputStream inputStream, int bufferSize) byte[]
getBytes
(InputStream inputStream, int bufferSize, boolean cleanUpStream) byte[]
getExtension
(String fileName) static FileImpl
getMD5Checksum
(File file) getShortFileName
(String fullFileName) boolean
isSameContent
(File file, byte[] bytes, int length) boolean
isSameContent
(File file, String s) String[]
String[]
String[]
String[]
void
void
protected void
mkdirsParentFile
(File file) boolean
boolean
replaceSeparator
(String fileName) File[]
stripExtension
(String fileName) stripParentheticalSuffix
(String fileName) toProperties
(FileInputStream fileInputStream) toProperties
(String fileName) void
void
void
void
void
void
void
void
write
(File file, InputStream inputStream) void
void
void
void
void
write
(String fileName, InputStream inputStream) void
void
void
void
void
void
-
Constructor Details
-
FileImpl
public FileImpl()
-
-
Method Details
-
getInstance
-
appendParentheticalSuffix
- Specified by:
appendParentheticalSuffix
in interfacecom.liferay.portal.kernel.util.File
-
appendSuffix
- Specified by:
appendSuffix
in interfacecom.liferay.portal.kernel.util.File
-
copyDirectory
- Specified by:
copyDirectory
in interfacecom.liferay.portal.kernel.util.File
- Throws:
IOException
-
copyDirectory
- Specified by:
copyDirectory
in interfacecom.liferay.portal.kernel.util.File
- Throws:
IOException
-
copyFile
- Specified by:
copyFile
in interfacecom.liferay.portal.kernel.util.File
- Throws:
IOException
-
copyFile
- Specified by:
copyFile
in interfacecom.liferay.portal.kernel.util.File
- Throws:
IOException
-
createTempFile
- Specified by:
createTempFile
in interfacecom.liferay.portal.kernel.util.File
-
createTempFile
- Specified by:
createTempFile
in interfacecom.liferay.portal.kernel.util.File
- Throws:
IOException
-
createTempFile
- Specified by:
createTempFile
in interfacecom.liferay.portal.kernel.util.File
- Throws:
IOException
-
createTempFile
- Specified by:
createTempFile
in interfacecom.liferay.portal.kernel.util.File
-
createTempFile
- Specified by:
createTempFile
in interfacecom.liferay.portal.kernel.util.File
-
createTempFileName
- Specified by:
createTempFileName
in interfacecom.liferay.portal.kernel.util.File
-
createTempFileName
- Specified by:
createTempFileName
in interfacecom.liferay.portal.kernel.util.File
-
createTempFileName
- Specified by:
createTempFileName
in interfacecom.liferay.portal.kernel.util.File
-
createTempFolder
- Specified by:
createTempFolder
in interfacecom.liferay.portal.kernel.util.File
- Throws:
IOException
-
decodeSafeFileName
- Specified by:
decodeSafeFileName
in interfacecom.liferay.portal.kernel.util.File
-
delete
- Specified by:
delete
in interfacecom.liferay.portal.kernel.util.File
-
delete
- Specified by:
delete
in interfacecom.liferay.portal.kernel.util.File
-
deltree
- Specified by:
deltree
in interfacecom.liferay.portal.kernel.util.File
-
deltree
- Specified by:
deltree
in interfacecom.liferay.portal.kernel.util.File
-
encodeSafeFileName
- Specified by:
encodeSafeFileName
in interfacecom.liferay.portal.kernel.util.File
-
exists
- Specified by:
exists
in interfacecom.liferay.portal.kernel.util.File
-
exists
- Specified by:
exists
in interfacecom.liferay.portal.kernel.util.File
-
getAbsolutePath
- Specified by:
getAbsolutePath
in interfacecom.liferay.portal.kernel.util.File
-
getBytes
- Specified by:
getBytes
in interfacecom.liferay.portal.kernel.util.File
- Throws:
IOException
-
getBytes
- Specified by:
getBytes
in interfacecom.liferay.portal.kernel.util.File
- Throws:
IOException
-
getBytes
- Specified by:
getBytes
in interfacecom.liferay.portal.kernel.util.File
- Throws:
IOException
-
getBytes
- Specified by:
getBytes
in interfacecom.liferay.portal.kernel.util.File
- Throws:
IOException
-
getBytes
public byte[] getBytes(InputStream inputStream, int bufferSize, boolean cleanUpStream) throws IOException - Specified by:
getBytes
in interfacecom.liferay.portal.kernel.util.File
- Throws:
IOException
-
getExtension
- Specified by:
getExtension
in interfacecom.liferay.portal.kernel.util.File
-
getMD5Checksum
- Specified by:
getMD5Checksum
in interfacecom.liferay.portal.kernel.util.File
- Throws:
IOException
-
getPath
- Specified by:
getPath
in interfacecom.liferay.portal.kernel.util.File
-
getShortFileName
- Specified by:
getShortFileName
in interfacecom.liferay.portal.kernel.util.File
-
isSameContent
- Specified by:
isSameContent
in interfacecom.liferay.portal.kernel.util.File
-
isSameContent
- Specified by:
isSameContent
in interfacecom.liferay.portal.kernel.util.File
-
listDirs
- Specified by:
listDirs
in interfacecom.liferay.portal.kernel.util.File
-
listDirs
- Specified by:
listDirs
in interfacecom.liferay.portal.kernel.util.File
-
listFiles
- Specified by:
listFiles
in interfacecom.liferay.portal.kernel.util.File
-
listFiles
- Specified by:
listFiles
in interfacecom.liferay.portal.kernel.util.File
-
mkdirs
- Specified by:
mkdirs
in interfacecom.liferay.portal.kernel.util.File
-
mkdirs
- Specified by:
mkdirs
in interfacecom.liferay.portal.kernel.util.File
-
move
- Specified by:
move
in interfacecom.liferay.portal.kernel.util.File
-
move
- Specified by:
move
in interfacecom.liferay.portal.kernel.util.File
-
read
- Specified by:
read
in interfacecom.liferay.portal.kernel.util.File
- Throws:
IOException
-
read
- Specified by:
read
in interfacecom.liferay.portal.kernel.util.File
- Throws:
IOException
-
read
- Specified by:
read
in interfacecom.liferay.portal.kernel.util.File
- Throws:
IOException
-
replaceSeparator
- Specified by:
replaceSeparator
in interfacecom.liferay.portal.kernel.util.File
-
sortFiles
- Specified by:
sortFiles
in interfacecom.liferay.portal.kernel.util.File
-
stripExtension
- Specified by:
stripExtension
in interfacecom.liferay.portal.kernel.util.File
-
stripParentheticalSuffix
- Specified by:
stripParentheticalSuffix
in interfacecom.liferay.portal.kernel.util.File
-
toList
- Specified by:
toList
in interfacecom.liferay.portal.kernel.util.File
-
toList
- Specified by:
toList
in interfacecom.liferay.portal.kernel.util.File
-
toProperties
- Specified by:
toProperties
in interfacecom.liferay.portal.kernel.util.File
-
toProperties
- Specified by:
toProperties
in interfacecom.liferay.portal.kernel.util.File
-
touch
- Specified by:
touch
in interfacecom.liferay.portal.kernel.util.File
- Throws:
IOException
-
touch
- Specified by:
touch
in interfacecom.liferay.portal.kernel.util.File
- Throws:
IOException
-
unzip
- Specified by:
unzip
in interfacecom.liferay.portal.kernel.util.File
-
write
- Specified by:
write
in interfacecom.liferay.portal.kernel.util.File
- Throws:
IOException
-
write
- Specified by:
write
in interfacecom.liferay.portal.kernel.util.File
- Throws:
IOException
-
write
- Specified by:
write
in interfacecom.liferay.portal.kernel.util.File
- Throws:
IOException
-
write
public void write(File file, byte[] bytes, int offset, int length, boolean append) throws IOException - Specified by:
write
in interfacecom.liferay.portal.kernel.util.File
- Throws:
IOException
-
write
- Specified by:
write
in interfacecom.liferay.portal.kernel.util.File
- Throws:
IOException
-
write
- Specified by:
write
in interfacecom.liferay.portal.kernel.util.File
- Throws:
IOException
-
write
- Specified by:
write
in interfacecom.liferay.portal.kernel.util.File
- Throws:
IOException
-
write
- Specified by:
write
in interfacecom.liferay.portal.kernel.util.File
- Throws:
IOException
-
write
- Specified by:
write
in interfacecom.liferay.portal.kernel.util.File
- Throws:
IOException
-
write
- Specified by:
write
in interfacecom.liferay.portal.kernel.util.File
- Throws:
IOException
-
write
- Specified by:
write
in interfacecom.liferay.portal.kernel.util.File
- Throws:
IOException
-
write
- Specified by:
write
in interfacecom.liferay.portal.kernel.util.File
- Throws:
IOException
-
write
- Specified by:
write
in interfacecom.liferay.portal.kernel.util.File
- Throws:
IOException
-
write
- Specified by:
write
in interfacecom.liferay.portal.kernel.util.File
- Throws:
IOException
-
write
- Specified by:
write
in interfacecom.liferay.portal.kernel.util.File
- Throws:
IOException
-
write
public void write(String pathName, String fileName, String s, boolean lazy, boolean append) throws IOException - Specified by:
write
in interfacecom.liferay.portal.kernel.util.File
- Throws:
IOException
-
mkdirsParentFile
- Throws:
IOException
-