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
- lengthIOException
public static void write(OutputStream out, String str) throws IOException
out
- outstr
- strIOException
public static void write(OutputStream out, String str, String charset) throws IOException
out
- outstr
- strIOException
public static void write(Writer writer, byte[] bs) throws IOException
IOException
public static void write(Writer writer, byte[] bs, int off, int len) throws IOException
IOException
public static void write(Writer writer, char[] cs) throws IOException
IOException
public static void write(Writer writer, String str) throws IOException
writer
- writerstr
- strIOException
Copyright © 2024. All rights reserved.