public class Streams extends Object
public static void close(AutoCloseable c)
public static void close(AutoCloseable c, boolean close)
public static void flush(Flushable f)
public static void flush(Flushable f, boolean flush)
public static BufferedReader toBufferedReader(Reader reader)
public static BufferedReader toBufferedReader(Reader reader, int bufferSize)
public static BufferedWriter toBufferedWriter(Writer writer)
public static BufferedWriter toBufferedWriter(Writer writer, int bufferSize)
public static int transfer(RandomAccessFile access, OutputStream output) throws IOException
IOException
public static long transferLarge(RandomAccessFile access, OutputStream output) throws IOException
IOException
public static int transfer(InputStream input, OutputStream output) throws IOException
IOException
public static long transferLarge(InputStream input, OutputStream output) throws IOException
IOException
public static void transfer(InputStream input, Writer output) throws IOException
IOException
public static void transfer(InputStream input, Writer output, String charset) throws IOException
IOException
public static int transfer(Reader input, Writer output) throws IOException
IOException
public static long transferLarge(Reader input, Writer output) throws IOException
IOException
public static void transfer(Reader input, OutputStream output) throws IOException
IOException
public static void transfer(Reader input, OutputStream output, String charset) throws IOException
IOException
public static byte[] toByteArray(InputStream input) throws IOException
IOException
public static byte[] toByteArray(Reader input) throws IOException
IOException
public static byte[] toByteArray(Reader input, String charset) throws IOException
IOException
public static char[] toCharArray(InputStream is) throws IOException
IOException
public static char[] toCharArray(InputStream is, String charset) throws IOException
IOException
public static char[] toCharArray(Reader input) throws IOException
IOException
public static String toString(InputStream input) throws IOException
IOException
public static String toString(InputStream input, String charset) throws IOException
IOException
public static String toString(Reader input) throws IOException
IOException
public static String toString(byte[] input) throws IOException
IOException
public static String toString(byte[] input, String charset) throws IOException
IOException
public static InputStream toInputStream(byte[] bs)
public static InputStream toInputStream(byte[] bs, int off, int len)
public static InputStream toInputStream(String input)
public static InputStream toInputStream(String input, String charset)
public static OutputStream toOutputStream(byte[] bs)
public static OutputStream toOutputStream(byte[] bs, int off, int len)
public static OutputStream toOutputStream(String input)
public static OutputStream toOutputStream(String input, String charset)
public static String md5(InputStream in)
in
- 流public static String sha1(InputStream in)
in
- 流public static String sha224(InputStream in)
in
- 流public static String sha256(InputStream in)
in
- 流public static String sha384(InputStream in)
in
- 流public static String sha512(InputStream in)
in
- 流public static String sign(InputStream in, HashDigest type)
in
- 流type
- 加密类型 MD5 SHA-1 SHA-224 SHA-256 SHA-384 SHA-512public static void lineConsumer(InputStream in, Consumer<String> c) throws IOException
IOException
public static void lineConsumer(InputStream in, String charset, Consumer<String> c) throws IOException
IOException
public static void lineConsumer(Reader reader, Consumer<String> c) throws IOException
IOException
public static void lineConsumer(Reader reader, int bufferSize, Consumer<String> c) throws IOException
IOException
public static LineIterator lineIterator(Reader reader)
public static LineIterator lineIterator(InputStream input)
public static LineIterator lineIterator(InputStream input, String charset) throws IOException
IOException
public static void byteArrayConsumer(InputStream input, byte[] buffer, IntConsumer consumer) throws IOException
IOException
public static ByteArrayIterator byteArrayIterator(InputStream input, byte[] buffer)
Copyright © 2024. All rights reserved.