Package aQute.lib.json
Class Encoder
- java.lang.Object
-
- aQute.lib.json.Encoder
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.Appendable,java.lang.AutoCloseable
public class Encoder extends java.lang.Object implements java.lang.Appendable, java.io.Closeable, java.io.Flushable
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Appendableappend(char c)java.lang.Appendableappend(java.lang.CharSequence sq)java.lang.Appendableappend(java.lang.CharSequence sq, int start, int length)Encodercharset(java.lang.String encoding)Encodercharset(java.nio.charset.Charset encoding)voidclose()Encoderdeflate()byte[]digest()voidflush()Encoderindent(java.lang.String tabs)EncoderkeepOpen()Encoderlinebreak(java.lang.String linebreak)Encodermark()Encoderput(java.lang.Object object)Encoderto()Encoderto(java.io.File file)Encoderto(java.io.OutputStream out)Encoderto(java.lang.Appendable out)java.lang.StringtoString()EncoderwriteDefaults()
-
-
-
Method Detail
-
put
public Encoder put(java.lang.Object object) throws java.lang.Exception
- Throws:
java.lang.Exception
-
mark
public Encoder mark() throws java.security.NoSuchAlgorithmException
- Throws:
java.security.NoSuchAlgorithmException
-
digest
public byte[] digest() throws java.security.NoSuchAlgorithmException, java.io.IOException- Throws:
java.security.NoSuchAlgorithmExceptionjava.io.IOException
-
to
public Encoder to() throws java.io.IOException
- Throws:
java.io.IOException
-
to
public Encoder to(java.io.File file) throws java.io.IOException
- Throws:
java.io.IOException
-
charset
public Encoder charset(java.lang.String encoding)
-
charset
public Encoder charset(java.nio.charset.Charset encoding)
-
to
public Encoder to(java.io.OutputStream out) throws java.io.IOException
- Throws:
java.io.IOException
-
to
public Encoder to(java.lang.Appendable out) throws java.io.IOException
- Throws:
java.io.IOException
-
append
public java.lang.Appendable append(char c) throws java.io.IOException- Specified by:
appendin interfacejava.lang.Appendable- Throws:
java.io.IOException
-
append
public java.lang.Appendable append(java.lang.CharSequence sq) throws java.io.IOException- Specified by:
appendin interfacejava.lang.Appendable- Throws:
java.io.IOException
-
append
public java.lang.Appendable append(java.lang.CharSequence sq, int start, int length) throws java.io.IOException- Specified by:
appendin interfacejava.lang.Appendable- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
writeDefaults
public Encoder writeDefaults()
-
flush
public void flush() throws java.io.IOException- Specified by:
flushin interfacejava.io.Flushable- Throws:
java.io.IOException
-
deflate
public Encoder deflate()
-
indent
public Encoder indent(java.lang.String tabs)
-
linebreak
public Encoder linebreak(java.lang.String linebreak)
-
keepOpen
public Encoder keepOpen()
-
-