java.lang.Object
org.openpdf.util.IOUtil
- Author:
- patrick
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidDeprecated.Use try-with-resources idiom instead.static voidstatic voiddeleteAllFiles(File dir) static @Nullable InputStreamgetInputStream(@Nullable String uri) Gets a Reader for the resource identifiedstatic @Nullable InputStreamopenStreamAtUrl(String uri) Attempts to open a connection, and a stream, to the URI provided. timeouts will be set for opening the connection and reading from it. will return the stream, or null if unable to open or read or a timeout occurred.static byte[]readBytes(InputStream is) static byte @Nullable []static byte[]
-
Constructor Details
-
IOUtil
public IOUtil()
-
-
Method Details
-
copyFile
- Throws:
IOException
-
deleteAllFiles
- Throws:
IOException
-
openStreamAtUrl
Attempts to open a connection, and a stream, to the URI provided. timeouts will be set for opening the connection and reading from it. will return the stream, or null if unable to open or read or a timeout occurred. Does not buffer the stream. -
getInputStream
Gets a Reader for the resource identified- Returns:
- The stylesheet value
-
readBytes
-
readBytes
- Throws:
IOException
-
readBytes
- Throws:
IOException
-
close
Deprecated.Use try-with-resources idiom instead.
-