public class IO extends Object
| 构造器和说明 |
|---|
IO() |
public static void close(AutoCloseable closeable)
public static BufferedInputStream getInputStream(File file) throws IOException
IOExceptionpublic static ByteArrayInputStream toStream(byte[] content)
public static FileInputStream toStream(File file) throws IOException
IOExceptionpublic static BufferedInputStream toBuffered(InputStream in)
public static BufferedInputStream toBuffered(InputStream in, int bufferSize)
public static InputStream getInputStream(String path) throws FileNotFoundException
public static InputStream getInputStream(String path, Class<?> caller) throws FileNotFoundException
public static BufferedReader getReader(@Nonnull InputStream in, Charset charset)
public static BufferedReader getReader(@Nonnull Reader reader)
public static BufferedReader toBuffered(Reader reader)
public static BufferedReader toBuffered(Reader reader, int bufferSize)
public static BufferedOutputStream getOutputStream(@Nonnull File file) throws IOException
IOExceptionpublic static BufferedOutputStream toBuffered(@Nonnull OutputStream out)
public static BufferedOutputStream toBuffered(OutputStream out, int bufferSize)
public static OutputStreamWriter getWriter(OutputStream out, Charset charset)
public static BufferedWriter toBuffered(Writer writer)
public static BufferedWriter toBuffered(Writer writer, int bufferSize)
public static byte[] toBytes(File file) throws IOException
IOExceptionpublic static byte[] toBytes(InputStream input) throws IOException
IOExceptionpublic static byte[] toBytes(InputStream input, int bufferSize) throws IOException
IOExceptionpublic static String toString(InputStream input) throws IOException
IOExceptionpublic static String toString(InputStream input, int bufferSize) throws IOException
IOExceptionpublic static String toString(InputStream input, String charset) throws IOException
IOExceptionpublic static String toString(InputStream input, Charset charset) throws IOException
IOExceptionpublic static String toString(InputStream input, String charset, int bufferSize) throws IOException
IOExceptionpublic static String toString(InputStream input, Charset charset, int bufferSize) throws IOException
IOExceptionpublic static String toString(Reader input) throws IOException
IOExceptionpublic static String toString(Reader input, int bufferSize) throws IOException
IOExceptionpublic static int copy(InputStream input, OutputStream output) throws IOException
IOExceptionpublic static int copy(InputStream input, OutputStream output, int bufferSize) throws IOException
IOExceptionpublic static int copy(Reader input, Writer output) throws IOException
IOExceptionpublic static int copy(Reader input, Writer output, int bufferSize) throws IOException
IOExceptionpublic static int copy(File src, File dest) throws IOException
IOExceptionpublic static void writeBytes(File file, byte[] bytes) throws IOException
IOExceptionpublic static void writeBytes(OutputStream out, byte[]... bytesArray) throws IOException
IOExceptionpublic static void writeString(File file, Charset charset, String content) throws IOException
IOExceptionpublic static void writeString(OutputStream out, Charset charset, String... contents) throws IOException
IOExceptionpublic static void mkdir(File dir)
public static void mkdirParent(File file)
Copyright © 2025 fossc. All rights reserved.