public static class CSVUtil.Writer extends Object implements Closeable
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
void |
newLine()
Writes a line separator.
|
void |
write(boolean b)
Writes a boolean value, will be convert to boolean string upper case
|
void |
write(char[] chars)
Compression and escape char sequence
- line-break, double-quote or commas should be quoted
|
void |
write(char[] chars,
int offset,
int size)
Compression and escape char sequence
- line-break, double-quote or commas should be quoted
|
void |
write(double d)
Writes a double-precision floating-point value, will be convert to double-precision string
|
void |
write(float f)
Writes a single-precision floating-point value, will be convert to single-precision string
|
void |
write(int n)
Writes a int value, will be convert to int string
|
void |
write(long l)
Writes a long value, will be convert to long string
|
void |
write(String text)
Compression and escape char sequence
- line-break, double-quote or commas should be quoted
|
void |
writeChar(char c)
Writes a single character
|
void |
writeEmpty()
Writes a empty column.
|
public void writeChar(char c)
throws IOException
c - int specifying a character to be writtenIOException - If an I/O error occurspublic void write(boolean b)
throws IOException
b - the int value to be writtenIOException - If an I/O error occurspublic void write(int n)
throws IOException
n - the int value to be writtenIOException - If an I/O error occurspublic void write(long l)
throws IOException
l - the long value to be writtenIOException - If an I/O error occurspublic void write(float f)
throws IOException
f - the single-precision floating-point to be writtenIOException - If an I/O error occurspublic void write(double d)
throws IOException
d - the double-precision floating-point to be writtenIOException - If an I/O error occurspublic void write(String text) throws IOException
text - the string to be writtenIOException - If an I/O error occurspublic void write(char[] chars)
throws IOException
chars - the char sequence to be writtenIOException - If an I/O error occurspublic void write(char[] chars,
int offset,
int size)
throws IOException
chars - the char sequence to be writtenoffset - the offset indexsize - size of charactersIOException - If an I/O error occurspublic void writeEmpty()
throws IOException
IOException - If an I/O error occurspublic void newLine()
throws IOException
IOException - If an I/O error occurspublic void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableIOExceptionCopyright © 2020. All rights reserved.