/** * Returns a factory that will supply instances of {@link InputStream} that * read from the given URL. * * @param url the URL to read from * @return the factory */ public static InputSupplier<InputStream> newInputStreamSupplier(URL url) { return ByteStreams.asInputSupplier(asByteSource(url)); }
/** * Returns a factory that will supply instances of {@link InputStream} that * read from the given URL. * * @param url the URL to read from * @return the factory */ public static InputSupplier<InputStream> newInputStreamSupplier(URL url) { return ByteStreams.asInputSupplier(asByteSource(url)); }
/** * Returns a factory that will supply instances of * {@link ByteArrayInputStream} that read from the given byte array. * * @param b the input buffer * @return the factory */ public static InputSupplier<ByteArrayInputStream> newInputStreamSupplier( byte[] b) { return asInputSupplier(ByteSource.wrap(b)); }
/** * Returns a factory that will supply instances of {@link InputStream} that * read from the given URL. * * @param url the URL to read from * @return the factory */ public static InputSupplier<InputStream> newInputStreamSupplier(URL url) { return ByteStreams.asInputSupplier(asByteSource(url)); }
/** * Returns a factory that will supply instances of {@link FileInputStream} * that read from a file. * * @param file the file to read from * @return the factory */ public static InputSupplier<FileInputStream> newInputStreamSupplier( final File file) { return ByteStreams.asInputSupplier(asByteSource(file)); }
/** * Returns a factory that will supply instances of {@link InputStream} that * read from the given URL. * * @param url the URL to read from * @return the factory */ public static InputSupplier<InputStream> newInputStreamSupplier(URL url) { return ByteStreams.asInputSupplier(asByteSource(url)); }
/** * Returns a factory that will supply instances of * {@link ByteArrayInputStream} that read from the given byte array. * * @param b the input buffer * @return the factory */ public static InputSupplier<ByteArrayInputStream> newInputStreamSupplier( byte[] b) { return asInputSupplier(ByteSource.wrap(b)); }
/** * Returns a factory that will supply instances of {@link FileInputStream} * that read from a file. * * @param file the file to read from * @return the factory */ public static InputSupplier<FileInputStream> newInputStreamSupplier( final File file) { return ByteStreams.asInputSupplier(asByteSource(file)); }
/** * Returns a factory that will supply instances of {@link FileInputStream} * that read from a file. * * @param file the file to read from * @return the factory */ public static InputSupplier<FileInputStream> newInputStreamSupplier( final File file) { return ByteStreams.asInputSupplier(asByteSource(file)); }
/** * Returns a factory that will supply instances of * {@link ByteArrayInputStream} that read from the given byte array. * * @param b the input buffer * @return the factory */ public static InputSupplier<ByteArrayInputStream> newInputStreamSupplier( byte[] b) { return asInputSupplier(ByteSource.wrap(b)); }
/** * Returns a factory that will supply instances of {@link FileInputStream} * that read from a file. * * @param file the file to read from * @return the factory */ public static InputSupplier<FileInputStream> newInputStreamSupplier( final File file) { return ByteStreams.asInputSupplier(asByteSource(file)); }
/** * Returns a factory that will supply instances of {@link FileInputStream} * that read from a file. * * @param file the file to read from * @return the factory */ public static InputSupplier<FileInputStream> newInputStreamSupplier( final File file) { return ByteStreams.asInputSupplier(asByteSource(file)); }
/** * Returns a factory that will supply instances of {@link InputStream} that * read from the given URL. * * @param url the URL to read from * @return the factory */ public static InputSupplier<InputStream> newInputStreamSupplier(URL url) { return ByteStreams.asInputSupplier(asByteSource(url)); }
/** * Returns a factory that will supply instances of * {@link ByteArrayInputStream} that read from the given byte array. * * @param b the input buffer * @return the factory */ public static InputSupplier<ByteArrayInputStream> newInputStreamSupplier( byte[] b) { return ByteStreams.asInputSupplier(asByteSource(b)); }
/** * Returns a factory that will supply instances of * {@link ByteArrayInputStream} that read from the given byte array. * * @param b the input buffer * @return the factory */ public static InputSupplier<ByteArrayInputStream> newInputStreamSupplier( byte[] b) { return asInputSupplier(ByteSource.wrap(b)); }
/** * Returns a factory that will supply instances of {@link InputStream} that * read from the given URL. * * @param url the URL to read from * @return the factory * @deprecated Use {@link #asByteSource(URL)} instead. This method is * scheduled for removal in Guava 18.0. */ @Deprecated public static InputSupplier<InputStream> newInputStreamSupplier(URL url) { return ByteStreams.asInputSupplier(asByteSource(url)); }
/** * Returns a factory that will supply instances of {@link InputStream} that * read from the given URL. * * @param url the URL to read from * @return the factory * @deprecated Use {@link #asByteSource(URL)} instead. This method is * scheduled for removal in Guava 18.0. */ @Deprecated public static InputSupplier<InputStream> newInputStreamSupplier(URL url) { return ByteStreams.asInputSupplier(asByteSource(url)); }
/** * Returns a factory that will supply instances of * {@link ByteArrayInputStream} that read from the given byte array. * * @param b the input buffer * @param off the offset in the buffer of the first byte to read * @param len the maximum number of bytes to read from the buffer * @return the factory */ public static InputSupplier<ByteArrayInputStream> newInputStreamSupplier( final byte[] b, final int off, final int len) { return asInputSupplier(ByteSource.wrap(b).slice(off, len)); }
/** * Returns a factory that will supply instances of * {@link ByteArrayInputStream} that read from the given byte array. * * @param b the input buffer * @param off the offset in the buffer of the first byte to read * @param len the maximum number of bytes to read from the buffer * @return the factory */ public static InputSupplier<ByteArrayInputStream> newInputStreamSupplier( final byte[] b, final int off, final int len) { return ByteStreams.asInputSupplier(asByteSource(b).slice(off, len)); }
/** * Returns a factory that will supply instances of * {@link ByteArrayInputStream} that read from the given byte array. * * @param b the input buffer * @param off the offset in the buffer of the first byte to read * @param len the maximum number of bytes to read from the buffer * @return the factory */ public static InputSupplier<ByteArrayInputStream> newInputStreamSupplier( final byte[] b, final int off, final int len) { return asInputSupplier(ByteSource.wrap(b).slice(off, len)); }