public class StreamWriters extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
write(OutputStream out,
byte[] bs,
int off,
int len)
写入数组
|
static void |
write(OutputStream out,
String str)
写入字符
|
static void |
write(OutputStream out,
String str,
String charset)
写入字符
|
static void |
write(Writer writer,
byte[] bs) |
static void |
write(Writer writer,
byte[] bs,
int off,
int len) |
static void |
write(Writer writer,
char[] cs) |
static void |
write(Writer writer,
String str)
写入字符
|
public static void write(OutputStream out, byte[] bs, int off, int len) throws IOException
out - outbs - bytesoff - offsetlen - lengthIOExceptionpublic static void write(OutputStream out, String str) throws IOException
out - outstr - strIOExceptionpublic static void write(OutputStream out, String str, String charset) throws IOException
out - outstr - strIOExceptionpublic static void write(Writer writer, byte[] bs) throws IOException
IOExceptionpublic static void write(Writer writer, byte[] bs, int off, int len) throws IOException
IOExceptionpublic static void write(Writer writer, char[] cs) throws IOException
IOExceptionpublic static void write(Writer writer, String str) throws IOException
writer - writerstr - strIOExceptionCopyright © 2025. All rights reserved.