Class IOUtil


  • @ParametersAreNonnullByDefault
    public class IOUtil
    extends Object
    Author:
    patrick
    • Constructor Detail

      • IOUtil

        public IOUtil()
    • Method Detail

      • openStreamAtUrl

        public static InputStream openStreamAtUrl​(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. Does not buffer the stream.
      • getInputStream

        @Nullable
        @CheckReturnValue
        public static InputStream getInputStream​(String uri)
        Gets a Reader for the resource identified
        Returns:
        The stylesheet value
      • readBytes

        @Nullable
        @CheckReturnValue
        public static byte[] readBytes​(String uri)
      • close

        public static void close​(@Nullable
                                 Closeable in)