Package org.xhtmlrenderer.util
Class IOUtil
java.lang.Object
org.xhtmlrenderer.util.IOUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Deprecated.Use try-with-resources idiom instead.private static void
copyBytes
(InputStream in, OutputStream out) static void
static void
deleteAllFiles
(File dir) static @Nullable InputStream
getInputStream
(@Nullable String uri) Gets a Reader for the resource identifiedstatic @Nullable InputStream
openStreamAtUrl
(String uri) Attempts to open a connection, and a stream, to the URI provided.static byte[]
readBytes
(InputStream is) static byte @Nullable []
static byte[]
-
Constructor Details
-
IOUtil
public IOUtil()
-
-
Method Details
-
copyFile
- Throws:
IOException
-
copyBytes
- 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.
-