Package org.javlo.helper
Class ResourceHelper
- java.lang.Object
-
- org.javlo.helper.ResourceHelper
-
public class ResourceHelper extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classResourceHelper.ImageFilenameFilterstatic classResourceHelper.VideoFilenameFilter
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_BUFFER_SIZEprotected static Loggerloggercreate a static logger.static StringPRIVATE_DIRfile in private dir could not be downloadedstatic ObjectSYNCHRO_RESOURCE
-
Constructor Summary
Constructors Constructor Description ResourceHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidappendStringToFile(File file, String line)static booleancanModifFolder(ContentContext ctx, String folder)static StringchangeExtention(String filename, String newext)static booleanchecksumEquals(String checksum1, String checksum2)static booleancleanAllFileName(File file)normalize all file name from a dirstatic List<String>cleanFolderList(Collection<String> folders)clear a folder list, remove '/' if found as first char and replace '\' by '/'static intcleanImportResource(ContentContext ctx, File childImport)static intcleanImportResources(ContentContext ctx)delete import without reference to a existing page.static voidcloseResource(Closeable... resources)static voidcloseResource(HttpURLConnection... connections)static StringcomputeChecksum(File file)Return the standard checksum of the specified file.static voidcopyDir(File dir1, File dir2, boolean overwrite, FileFilter filter)static booleancopyFile(File source, File destination, boolean overwrite)transactional copy a file other filestatic voidcopyResourceData(ContentContext ctx, File file, File newFile)duplicate static info of a resource to a new filestatic voidcopyStream(InputStream input, OutputStream output, long start, long length)Copy the given byte range of the given input to the given output.static intcountLines(File file)static StringcreateModulePath(ContentContext ctx, String path)static booleandeleteFileAndParentDir(File file)static booleandeleteFolder(File folder)static booleandeleteResource(ContentContext ctx, File file)static voiddeleteResourceData(ContentContext ctx, File file)static voiddocx2html(File docx, File html)static voiddownloadResource(ContentContext ctx, String localDir, String baseURL, NodeXML nodeXML)static StringdownloadResourceAsString(URL workURL)static StringexcutePost(String targetURL, String urlParameters)static StringexcutePost(String targetURL, String urlParameters, String contentType, String lang, String user, String pwd)static StringextractNotStaticDir(StaticConfig staticConfig, GlobalContext globalContext, String fullPath)extract a relative path from a full path.static StringextractResourceDir(StaticConfig staticConfig, GlobalContext globalContext, String fullPath)extract a relative path from a full path.static StringextractResourcePathFromURL(ContentContext ctx, String url)static StringextractTemplateName(GlobalContext globalContext, File file)return the name of the templatestatic StringfileStructureToHtml(File file)static voidfilteredFileCopy(File file1, File file2, Map<String,String> filter)static voidfilteredFileCopyEscapeScriplet(File file1, File file2, Map<String,String> filter, boolean compress, boolean secure)static List<File>getAllDirList(File dir)get all directories under a directory (recursivly).static Collection<File>getAllFiles(File dir, FileFilter filter)static Collection<File>getAllFiles(File dir, FileFilter filter, Comparator<File> comp)static Collection<File>getAllFilesList(File dir)get all files under a directory (recursivly).static Collection<File>getAllResources(ContentContext ctx)static InputStreamgetChecksumInputStream(InputStream in)Add a checksum computing layer to the givenInputStream.static StringgetChecksumResult(InputStream chkIn)Exctract the result from aInputStreamreturned bygetChecksumInputStream(InputStream).static List<IContentVisualComponent>getComponentsUseResource(ContentContext ctx, String uri)static InputStreamgetConfigFile(javax.servlet.ServletContext servletContext, String fileName)static String[]getDirList(String directory)return a recursive directory array pathstatic StringgetFile(String fileName)static StringgetFileContent(File file)static StringgetFileExtensionToMineType(String ext)static File[]getFileList(String directory)static File[]getFileList(String directory, javax.servlet.http.HttpServletRequest request)static longgetFileSize(String filePath)static FilegetFreeFileName(File file)return a free file name. if file exist add a number as suffix.static IIOMetadatagetImageMetadata(File image)static longgetLatestModificationFileOnFolder(File folder, String... exts)static StringgetLinuxPath(String path)convert a path to a correct path for current OS. sample: /static/images on windows -> \static\images and on unix no change.static StringgetMineTypeToFileExtension(String mineType)static StringgetOSPath(String path)convert a path to a correct path for current OS. sample: /static/images on windows -> \static\images and on unix no change.static StringgetPath(String fileName)static StringgetRealPath(javax.servlet.ServletContext application, String path)static StringgetRelativeStaticURL(ContentContext ctx, File file)static Collection<File>getResourceWithoutMT(ContentContext ctx)static InputStreamgetStaticComponentResource(javax.servlet.ServletContext application, String componentType, String resource)static StringgetUserDirName(String userName)static StringgetWindowsFileName(String fileName)with iexplorer the name of the file is all the path this method extract the file name from a windows pathstatic booleanisAcceptedDocument(ContentContext ctx, String fileName)static booleanisAcceptedImage(ContentContext ctx, String fileName)static booleanisAcceptedVideo(ContentContext ctx, String fileName)static booleanisChildOf(File file, File folder)check if a file (or a folder) is under a folder. sample : /tmp/test/me.jpg with /tmp retrun truestatic booleanisComponentsUseResource(ContentContext ctx, String uri)static booleanisDocument(ContentContext ctx, String filename)check if this file is a document (list of extenion define in static-config.propertiesstatic booleanisImportPageExist(ContentContext ctx, File childImport)static booleanisPreviewFile(String file)static booleanisResourceURL(ContentContext ctx, String url)static booleanisSound(ContentContext ctx, String filename)check if this file is a document (list of extenion define in static-config.propertiesstatic booleanisTemplateFile(GlobalContext globalContext, File file)return true if file is insise template folderstatic booleanisTransformURL(ContentContext ctx, String url)static SerializableloadBeanFromXML(File file)static SerializableloadBeanFromXML(InputStream in)static SerializableloadBeanFromXML(String xml)static SerializableloadBeanFromXML(String xml, ClassLoader cl)static List<String>loadCollectionFromFile(File file)static PropertiesloadProperties(File file)static StringloadStringFromFile(File file)static StringloadStringFromStream(InputStream in, Charset encoding)static voidmain(String[] args)static StringmimifyJS(String js)static booleanmoveToGlobalTrash(StaticConfig staticConfig, String fileOrFolder)Move a file or a folder to the global trash, depending on staticConfig.static StringreadLine(RandomAccessFile file, Charset cs)static StringremoveDataFolderDir(GlobalContext globalContext, String path)remove the data folder directory this method is used for obtain a relative file path from a ablute file path.static StringremovePath(String path, String pathCuted)remove the path from a string this method is used for obtain a relative file path from a absolute file path.static List<String>removePrefixFromPathList(Collection<? extends Object> pathList, String prefix)static voidrenameResource(ContentContext ctx, File file, File newFile)change all the reference to a resource when a resource path or name if changedstatic voidsafeClose(Closeable... closeables)Close streams, writers, readers, etc without any exception even if they arenull.static Stringsha256(InputStream in)static Stringsha512(File file)static Stringsha512(InputStream in)static StringstoreBean(Serializable bean, File file)static StringstoreBean(Serializable bean, OutputStream out)static StringstoreBeanFromXML(Serializable bean)static byte[]storeBeanToBin(Serializable bean)static voidstoreCollectionToFile(File file, List<String> lines)static voidstoreProperties(Properties prop, File file)static voidwriteBytesToFile(File file, byte[] content)static FilewriteFileItemToFolder(org.apache.commons.fileupload.FileItem fileItem, File folder, boolean overwrite, boolean rename)static intwriteFileToFile(File fileIn, File file)static intwriteFileToStream(File fileIn, OutputStream out)static booleanwriteImageMetadata(IIOMetadata imageMetadata, File target)static voidwritePropertiesToFile(Properties properties, File file, String title)static voidwritePropertiesToFile(ConfigurationProperties properties, File file)static intwriteStreamToFile(InputStream in, File file)static intwriteStreamToFile(InputStream in, File file, long maxSize)static intwriteStreamToStream(InputStream in, OutputStream out)static intwriteStreamToStream(InputStream in, OutputStream out, long maxSize)write a InputStream in a OuputStream, without close.static StringwriteStreamToString(InputStream in, String encoding)static voidwriteStringToFile(File file, String content)static voidwriteStringToFile(File file, String content, String encoding)static voidwriteStringToStream(String content, OutputStream out)static voidwriteStringToStream(String content, OutputStream out, String encoding)static voidwriteUrlToFile(URL url, File imageFile)
-
-
-
Field Detail
-
DEFAULT_BUFFER_SIZE
public static final int DEFAULT_BUFFER_SIZE
- See Also:
- Constant Field Values
-
logger
protected static Logger logger
create a static logger.
-
SYNCHRO_RESOURCE
public static Object SYNCHRO_RESOURCE
-
PRIVATE_DIR
public static final String PRIVATE_DIR
file in private dir could not be downloaded- See Also:
- Constant Field Values
-
-
Method Detail
-
closeResource
public static void closeResource(Closeable... resources)
-
closeResource
public static void closeResource(HttpURLConnection... connections)
-
computeChecksum
public static String computeChecksum(File file) throws IOException
Return the standard checksum of the specified file.
The following functions are complementary:getChecksumInputStream(InputStream),getChecksumResult(InputStream),formatChecksum(long)- Parameters:
file-- Returns:
- the standard checksum of the specified file
- Throws:
IOException
-
deleteFileAndParentDir
public static boolean deleteFileAndParentDir(File file)
-
downloadResource
public static void downloadResource(ContentContext ctx, String localDir, String baseURL, NodeXML nodeXML) throws Exception
- Throws:
Exception
-
downloadResourceAsString
public static String downloadResourceAsString(URL workURL) throws IOException
- Throws:
IOException
-
extractNotStaticDir
public static String extractNotStaticDir(StaticConfig staticConfig, GlobalContext globalContext, String fullPath)
extract a relative path from a full path.- Parameters:
application- the servlet context.fullPath- a full path- Returns:
- retrun a relative path (sample: /var/data/static/test.png -> /static/test.png)
-
extractResourceDir
public static String extractResourceDir(StaticConfig staticConfig, GlobalContext globalContext, String fullPath)
extract a relative path from a full path.- Parameters:
application- the servlet context.fullPath- a full path- Returns:
- retrun a relative path (sample: /var/data/static/test.png -> /test.png)
-
filteredFileCopy
public static void filteredFileCopy(File file1, File file2, Map<String,String> filter) throws IOException
- Throws:
IOException
-
copyDir
public static void copyDir(File dir1, File dir2, boolean overwrite, FileFilter filter) throws IOException
- Throws:
IOException
-
copyFile
public static boolean copyFile(File source, File destination, boolean overwrite) throws IOException
transactional copy a file other file- Parameters:
source- the source file, must existdestination- the target file, could not existoverwrite- if true and file desctination exist, this method done nothing- Returns:
- true if file is copied, false otherwise
- Throws:
IOException- error width IO, file destination is'nt modified if there are error
-
extractResourcePathFromURL
public static String extractResourcePathFromURL(ContentContext ctx, String url)
-
filteredFileCopyEscapeScriplet
public static void filteredFileCopyEscapeScriplet(File file1, File file2, Map<String,String> filter, boolean compress, boolean secure) throws IOException
- Throws:
IOException
-
getAllDirList
public static List<File> getAllDirList(File dir)
get all directories under a directory (recursivly).- Parameters:
dir-- Returns:
- a list of directories (without files).
-
getAllFiles
public static Collection<File> getAllFiles(File dir, FileFilter filter)
-
getAllFiles
public static Collection<File> getAllFiles(File dir, FileFilter filter, Comparator<File> comp)
-
getAllFilesList
public static Collection<File> getAllFilesList(File dir)
get all files under a directory (recursivly).- Parameters:
dir-- Returns:
- a list of files (without directories).
-
getLatestModificationFileOnFolder
public static long getLatestModificationFileOnFolder(File folder, String... exts)
-
getAllResources
public static Collection<File> getAllResources(ContentContext ctx)
-
getChecksumInputStream
public static InputStream getChecksumInputStream(InputStream in)
Add a checksum computing layer to the givenInputStream.
Give the returnedInputStreamtogetChecksumResult(InputStream)to retrieve the checksum result.
The following functions are complementary:getChecksumResult(InputStream),computeChecksum(File),formatChecksum(long)- Parameters:
in-- Returns:
- an
InputStreamcomputing the checksum during the read, callgetChecksumResult(InputStream)to retrieve the checksum result.
-
getChecksumResult
public static String getChecksumResult(InputStream chkIn)
Exctract the result from aInputStreamreturned bygetChecksumInputStream(InputStream).
The following functions are complementary:getChecksumInputStream(InputStream),computeChecksum(File),formatChecksum(long)- Parameters:
chkIn-- Returns:
- the standard checksum of readed bytes from the given
InputStreampreviously wrapped bygetChecksumInputStream(InputStream)
-
getConfigFile
public static final InputStream getConfigFile(javax.servlet.ServletContext servletContext, String fileName) throws ResourceNotFoundException
- Throws:
ResourceNotFoundException
-
getDirList
public static String[] getDirList(String directory)
return a recursive directory array path- Parameters:
directory- the base directoryrequest- the current request- Returns:
- a array of path
-
getFileContent
public static String getFileContent(File file) throws FileNotFoundException, IOException
- Throws:
FileNotFoundExceptionIOException
-
getFileList
public static File[] getFileList(String directory, javax.servlet.http.HttpServletRequest request)
-
getFileSize
public static final long getFileSize(String filePath)
-
getLinuxPath
public static final String getLinuxPath(String path)
convert a path to a correct path for current OS. sample: /static/images on windows -> \static\images and on unix no change.- Parameters:
path- a path to a file- Returns:
- a correct file for current OS
-
getOSPath
public static final String getOSPath(String path)
convert a path to a correct path for current OS. sample: /static/images on windows -> \static\images and on unix no change.- Parameters:
path- a path to a file- Returns:
- a correct file for current OS
-
getResourceWithoutMT
public static Collection<File> getResourceWithoutMT(ContentContext ctx) throws Exception
- Throws:
Exception
-
getStaticComponentResource
public static final InputStream getStaticComponentResource(javax.servlet.ServletContext application, String componentType, String resource) throws FileNotFoundException
- Throws:
FileNotFoundException
-
getWindowsFileName
public static String getWindowsFileName(String fileName)
with iexplorer the name of the file is all the path this method extract the file name from a windows path
-
isChildOf
public static boolean isChildOf(File file, File folder) throws IOException
check if a file (or a folder) is under a folder. sample : /tmp/test/me.jpg with /tmp retrun true- Parameters:
file- a file, this file must be a real file or method return false.folder- a folder (if file -> return false), this file must be a real file or method return false.- Returns:
- true if the file is under the folder.
- Throws:
IOException
-
isPreviewFile
public static boolean isPreviewFile(String file)
-
isDocument
public static boolean isDocument(ContentContext ctx, String filename)
check if this file is a document (list of extenion define in static-config.properties- Parameters:
ctx-filename-- Returns:
-
isSound
public static boolean isSound(ContentContext ctx, String filename)
check if this file is a document (list of extenion define in static-config.properties- Parameters:
ctx-filename-- Returns:
-
isResourceURL
public static boolean isResourceURL(ContentContext ctx, String url)
-
isTransformURL
public static boolean isTransformURL(ContentContext ctx, String url) throws Exception
- Throws:
Exception
-
loadProperties
public static Properties loadProperties(File file) throws IOException
- Throws:
IOException
-
storeProperties
public static void storeProperties(Properties prop, File file) throws IOException
- Throws:
IOException
-
loadStringFromStream
public static final String loadStringFromStream(InputStream in, Charset encoding) throws IOException
- Throws:
IOException
-
loadStringFromFile
public static final String loadStringFromFile(File file) throws IOException
- Throws:
IOException
-
loadCollectionFromFile
public static final List<String> loadCollectionFromFile(File file) throws IOException
- Throws:
IOException
-
storeCollectionToFile
public static final void storeCollectionToFile(File file, List<String> lines) throws IOException
- Throws:
IOException
-
appendStringToFile
public static final void appendStringToFile(File file, String line) throws IOException
- Throws:
IOException
-
moveToGlobalTrash
public static boolean moveToGlobalTrash(StaticConfig staticConfig, String fileOrFolder)
Move a file or a folder to the global trash, depending on staticConfig.- Parameters:
staticConfig-fileOrFolder-- Returns:
trueif origin doesn't exist; or the result ofFile.renameTo(File).
-
removeDataFolderDir
public static String removeDataFolderDir(GlobalContext globalContext, String path)
remove the data folder directory this method is used for obtain a relative file path from a ablute file path.- Parameters:
path-- Returns:
-
removePath
public static String removePath(String path, String pathCuted)
remove the path from a string this method is used for obtain a relative file path from a absolute file path.- Parameters:
path-- Returns:
-
renameResource
public static void renameResource(ContentContext ctx, File file, File newFile) throws Exception
change all the reference to a resource when a resource path or name if changed- Parameters:
ctx-oldName-newName-- Throws:
Exception
-
copyResourceData
public static void copyResourceData(ContentContext ctx, File file, File newFile) throws Exception
duplicate static info of a resource to a new file- Parameters:
ctx-oldName-newName-- Throws:
Exception
-
deleteResource
public static boolean deleteResource(ContentContext ctx, File file) throws Exception
- Throws:
Exception
-
deleteResourceData
public static void deleteResourceData(ContentContext ctx, File file) throws Exception
- Throws:
Exception
-
safeClose
public static void safeClose(Closeable... closeables)
Close streams, writers, readers, etc without any exception even if they arenull.- Parameters:
closeables- the objects to close
-
writePropertiesToFile
public static final void writePropertiesToFile(Properties properties, File file, String title) throws IOException
- Throws:
IOException
-
writePropertiesToFile
public static final void writePropertiesToFile(ConfigurationProperties properties, File file) throws IOException
- Throws:
IOException
-
writeStreamToFile
public static final int writeStreamToFile(InputStream in, File file) throws IOException
- Throws:
IOException
-
writeStreamToFile
public static final int writeStreamToFile(InputStream in, File file, long maxSize) throws IOException
- Throws:
IOException
-
writeStreamToString
public static final String writeStreamToString(InputStream in, String encoding) throws IOException
- Throws:
IOException
-
writeFileToFile
public static final int writeFileToFile(File fileIn, File file) throws IOException
- Throws:
IOException
-
writeFileToStream
public static final int writeFileToStream(File fileIn, OutputStream out) throws IOException
- Throws:
IOException
-
writeFileItemToFolder
public static final File writeFileItemToFolder(org.apache.commons.fileupload.FileItem fileItem, File folder, boolean overwrite, boolean rename) throws IOException
- Throws:
IOException
-
writeStreamToStream
public static final int writeStreamToStream(InputStream in, OutputStream out) throws IOException
- Throws:
IOException
-
writeStreamToStream
public static final int writeStreamToStream(InputStream in, OutputStream out, long maxSize) throws IOException
write a InputStream in a OuputStream, without close.- Returns:
- the size of transfered data in byte.
- Throws:
IOException
-
copyStream
public static void copyStream(InputStream input, OutputStream output, long start, long length) throws IOException
Copy the given byte range of the given input to the given output.- Parameters:
input- The input to copy the given range to the given output for.output- The output to copy the given range from the given input for.start- Start of the byte range.length- Length of the byte range.- Throws:
IOException- If something fails at I/O level.
-
writeStringToFile
public static final void writeStringToFile(File file, String content) throws IOException
- Throws:
IOException
-
writeBytesToFile
public static final void writeBytesToFile(File file, byte[] content) throws IOException
- Throws:
IOException
-
writeStringToFile
public static final void writeStringToFile(File file, String content, String encoding) throws IOException
- Throws:
IOException
-
writeStringToStream
public static final void writeStringToStream(String content, OutputStream out, String encoding) throws IOException
- Throws:
IOException
-
writeStringToStream
public static final void writeStringToStream(String content, OutputStream out) throws IOException
- Throws:
IOException
-
getFreeFileName
public static File getFreeFileName(File file)
return a free file name. if file exist add a number as suffix.- Parameters:
file-- Returns:
-
isTemplateFile
public static boolean isTemplateFile(GlobalContext globalContext, File file)
return true if file is insise template folder- Parameters:
globalContext-file-- Returns:
-
extractTemplateName
public static String extractTemplateName(GlobalContext globalContext, File file)
return the name of the template- Parameters:
globalContext-file-- Returns:
-
readLine
public static String readLine(RandomAccessFile file, Charset cs) throws IOException
- Throws:
IOException
-
createModulePath
public static String createModulePath(ContentContext ctx, String path) throws ModuleException, Exception
- Throws:
ModuleExceptionException
-
loadBeanFromXML
public static Serializable loadBeanFromXML(String xml)
-
loadBeanFromXML
public static Serializable loadBeanFromXML(File file) throws FileNotFoundException
- Throws:
FileNotFoundException
-
loadBeanFromXML
public static Serializable loadBeanFromXML(InputStream in)
-
loadBeanFromXML
public static Serializable loadBeanFromXML(String xml, ClassLoader cl)
-
storeBeanFromXML
public static String storeBeanFromXML(Serializable bean)
-
storeBean
public static String storeBean(Serializable bean, OutputStream out)
-
storeBean
public static String storeBean(Serializable bean, File file) throws FileNotFoundException
- Throws:
FileNotFoundException
-
storeBeanToBin
public static byte[] storeBeanToBin(Serializable bean) throws IOException
- Throws:
IOException
-
getImageMetadata
public static IIOMetadata getImageMetadata(File image) throws IOException
- Throws:
IOException
-
writeImageMetadata
public static boolean writeImageMetadata(IIOMetadata imageMetadata, File target) throws IOException
- Throws:
IOException
-
excutePost
public static String excutePost(String targetURL, String urlParameters, String contentType, String lang, String user, String pwd)
-
cleanFolderList
public static List<String> cleanFolderList(Collection<String> folders)
clear a folder list, remove '/' if found as first char and replace '\' by '/'- Parameters:
folders-- Returns:
-
removePrefixFromPathList
public static List<String> removePrefixFromPathList(Collection<? extends Object> pathList, String prefix)
-
writeUrlToFile
public static void writeUrlToFile(URL url, File imageFile) throws IOException
- Throws:
IOException
-
canModifFolder
public static boolean canModifFolder(ContentContext ctx, String folder)
-
cleanImportResources
public static int cleanImportResources(ContentContext ctx) throws Exception
delete import without reference to a existing page.- Parameters:
ctx-- Returns:
- nomber of deleted import folder.
- Throws:
Exception
-
isImportPageExist
public static boolean isImportPageExist(ContentContext ctx, File childImport) throws Exception
- Throws:
Exception
-
cleanImportResource
public static int cleanImportResource(ContentContext ctx, File childImport) throws Exception
- Throws:
Exception
-
getComponentsUseResource
public static List<IContentVisualComponent> getComponentsUseResource(ContentContext ctx, String uri) throws Exception
- Throws:
Exception
-
isComponentsUseResource
public static boolean isComponentsUseResource(ContentContext ctx, String uri) throws Exception
- Throws:
Exception
-
isAcceptedImage
public static boolean isAcceptedImage(ContentContext ctx, String fileName)
-
isAcceptedVideo
public static boolean isAcceptedVideo(ContentContext ctx, String fileName)
-
isAcceptedDocument
public static boolean isAcceptedDocument(ContentContext ctx, String fileName)
-
getRealPath
public static String getRealPath(javax.servlet.ServletContext application, String path)
-
cleanAllFileName
public static boolean cleanAllFileName(File file) throws IOException
normalize all file name from a dir- Parameters:
file-- Returns:
- true one file name has changed
- Throws:
IOException
-
getRelativeStaticURL
public static String getRelativeStaticURL(ContentContext ctx, File file)
-
countLines
public static int countLines(File file) throws IOException
- Throws:
IOException
-
deleteFolder
public static boolean deleteFolder(File folder)
-
docx2html
public static void docx2html(File docx, File html) throws IOException
- Throws:
IOException
-
sha512
public static String sha512(File file) throws IOException, IllegalArgumentException
- Throws:
IOExceptionIllegalArgumentException
-
sha512
public static String sha512(InputStream in) throws IOException, IllegalArgumentException
- Throws:
IOExceptionIllegalArgumentException
-
sha256
public static String sha256(InputStream in) throws IOException, IllegalArgumentException
- Throws:
IOExceptionIllegalArgumentException
-
main
public static void main(String[] args) throws IOException
- Throws:
IOException
-
-