- All Superinterfaces:
Whitespace
- All Known Subinterfaces:
AnyCOLGROUP_content<D,
,__> AnyContent<D,
,__> AnyDATALIST_content<D,
,__> AnyDIV_content<D,
,__> AnyDL_content<D,
,__> AnyEmbeddedContent<D,
,__> AnyFlowContent<D,
,__> AnyHeadingContent<D,
,__> AnyHTML_content<D,
,__> AnyInteractiveContent<D,
,__> AnyListContent<D,
,__> AnyMetadataContent<D,
,__> AnyOBJECT_content<D,
,__> AnyOPTGROUP_content<D,
,__> AnyPalpableContent<D,
,__> AnyPhrasingContent<D,
,__> AnyScriptSupportingContent<D,
,__> AnySectioningContent<D,
,__> AnySELECT_content<D,
,__> AnyTABLE_content<D,
,__> AnyTextContent<D,
,__> AnyTR_content<D,
,__> AnyUnion_COLGROUP_ScriptSupporting<D,
,__> AnyUnion_DATALIST_OPTGROUP<D,
,__> AnyUnion_DIV_DL<D,
,__> AnyUnion_DL_Palpable<D,
,__> AnyUnion_Embedded_Interactive<D,
,__> AnyUnion_Embedded_Palpable_Phrasing<D,
,__> AnyUnion_Interactive_Phrasing<D,
,__> AnyUnion_Metadata_Phrasing<D,
,__> AnyUnion_Palpable_Phrasing<D,
,__> AnyUnion_TBODY_THEAD_TFOOT<D,
,__> Content<D,
__>
- All Known Implementing Classes:
AnyA
,AnyA_c
,AnyABBR
,AnyABBR__
,AnyABBR_c
,AnyADDRESS
,AnyADDRESS__
,AnyADDRESS_c
,AnyAREA
,AnyARTICLE
,AnyARTICLE__
,AnyARTICLE_c
,AnyASIDE
,AnyASIDE__
,AnyASIDE_c
,AnyB
,AnyB__
,AnyB_c
,AnyBASE
,AnyBDI
,AnyBDI__
,AnyBDI_c
,AnyBDO
,AnyBDO__
,AnyBDO_c
,AnyBLOCKQUOTE
,AnyBLOCKQUOTE__
,AnyBLOCKQUOTE_c
,AnyBODY
,AnyBODY__
,AnyBODY_c
,AnyBR
,AnyCAPTION
,AnyCAPTION__
,AnyCAPTION_c
,AnyCITE
,AnyCITE__
,AnyCITE_c
,AnyCODE
,AnyCODE__
,AnyCODE_c
,AnyCOL
,AnyCOLGROUP
,AnyCOLGROUP__
,AnyCOLGROUP_c
,AnyDATA
,AnyDATA__
,AnyDATA_c
,AnyDATALIST
,AnyDATALIST__
,AnyDATALIST_c
,AnyDD
,AnyDD__
,AnyDD_c
,AnyDEL
,AnyDEL_c
,AnyDFN
,AnyDFN__
,AnyDFN_c
,AnyDIV
,AnyDIV__
,AnyDIV_c
,AnyDL
,AnyDL__
,AnyDL_c
,AnyDocument
,AnyDT
,AnyDT__
,AnyDT_c
,AnyEM
,AnyEM__
,AnyEM_c
,AnyFOOTER
,AnyFOOTER__
,AnyFOOTER_c
,AnyFORM
,AnyFORM__
,AnyFORM_c
,AnyH
,AnyH__
,AnyH_c
,AnyH1
,AnyH1__
,AnyH1_c
,AnyH2
,AnyH2__
,AnyH2_c
,AnyH3
,AnyH3__
,AnyH3_c
,AnyH4
,AnyH4__
,AnyH4_c
,AnyH5
,AnyH5__
,AnyH5_c
,AnyH6
,AnyH6__
,AnyH6_c
,AnyHEAD
,AnyHEAD__
,AnyHEAD_c
,AnyHEADER
,AnyHEADER__
,AnyHEADER_c
,AnyHR
,AnyHTML
,AnyHTML__
,AnyHTML_c
,AnyI
,AnyI__
,AnyI_c
,AnyIMG
,AnyINPUT
,AnyINPUT.Button
,AnyINPUT.Checkbox
,AnyINPUT.Color
,AnyINPUT.Date
,AnyINPUT.DatetimeLocal
,AnyINPUT.Dynamic
,AnyINPUT.Email
,AnyINPUT.File
,AnyINPUT.Hidden
,AnyINPUT.Image
,AnyINPUT.Month
,AnyINPUT.Number
,AnyINPUT.Password
,AnyINPUT.Radio
,AnyINPUT.Range
,AnyINPUT.Reset
,AnyINPUT.Search
,AnyINPUT.Submit
,AnyINPUT.Tel
,AnyINPUT.Text
,AnyINPUT.Time
,AnyINPUT.Url
,AnyINPUT.Week
,AnyINS
,AnyINS_c
,AnyKBD
,AnyKBD__
,AnyKBD_c
,AnyLABEL
,AnyLABEL__
,AnyLABEL_c
,AnyLI
,AnyLI__
,AnyLI_c
,AnyLINK
,AnyMAIN
,AnyMAIN__
,AnyMAIN_c
,AnyMAP
,AnyMAP_c
,AnyMARK
,AnyMARK__
,AnyMARK_c
,AnyMENU
,AnyMENU__
,AnyMENU_c
,AnyMETA
,AnyMETER
,AnyMETER__
,AnyMETER_c
,AnyNAV
,AnyNAV__
,AnyNAV_c
,AnyOBJECT
,AnyOBJECT__
,AnyOBJECT_c
,AnyOL
,AnyOL__
,AnyOL_c
,AnyOPTGROUP
,AnyOPTGROUP__
,AnyOPTGROUP_c
,AnyOPTION
,AnyOPTION__
,AnyOPTION_c
,AnyOUTPUT
,AnyOUTPUT__
,AnyOUTPUT_c
,AnyP
,AnyP__
,AnyP_c
,AnyPARAM
,AnyPRE
,AnyPRE__
,AnyPRE_c
,AnyPROGRESS
,AnyPROGRESS__
,AnyPROGRESS_c
,AnyQ
,AnyQ__
,AnyQ_c
,AnyS
,AnyS__
,AnyS_c
,AnySAMP
,AnySAMP__
,AnySAMP_c
,AnySCRIPT
,AnySECTION
,AnySECTION__
,AnySECTION_c
,AnySELECT
,AnySELECT__
,AnySELECT_c
,AnySMALL
,AnySMALL__
,AnySMALL_c
,AnySPAN
,AnySPAN__
,AnySPAN_c
,AnySTRONG
,AnySTRONG__
,AnySTRONG_c
,AnySTYLE
,AnySUB
,AnySUB__
,AnySUB_c
,AnySUP
,AnySUP__
,AnySUP_c
,AnyTABLE
,AnyTABLE__
,AnyTABLE_c
,AnyTBODY
,AnyTBODY__
,AnyTBODY_c
,AnyTD
,AnyTD__
,AnyTD_c
,AnyTEXTAREA
,AnyTEXTAREA__
,AnyTEXTAREA_c
,AnyTFOOT
,AnyTFOOT__
,AnyTFOOT_c
,AnyTH
,AnyTH__
,AnyTH_c
,AnyTHEAD
,AnyTHEAD__
,AnyTHEAD_c
,AnyTITLE
,AnyTITLE__
,AnyTITLE_c
,AnyTR
,AnyTR__
,AnyTR_c
,AnyU
,AnyU__
,AnyU_c
,AnyUL
,AnyUL__
,AnyUL_c
,AnyVAR
,AnyVAR__
,AnyVAR_c
,AnyWBR
,Element
,Normal
,Normal__
,Normal_c
,NormalText
,NormalText__
,NormalText_c
,Transparent
,Transparent_c
,TransparentText
,TransparentText_c
,Void
- Author:
- AO Industries, Inc.
-
Field Summary
Fields inherited from interface com.aoapps.encoding.Whitespace
INDENT_SPACES, NL, SPACE
-
Method Summary
Modifier and TypeMethodDescriptionautoIndent
(int depthOffset) Performs automatic indentation with a depth offset whengetAutonli()
,Whitespace.getIndent()
, andgetAtnl()
.autoNl()
Performs automatic newline whengetAutonli()
and notgetAtnl()
.autoNli()
Performs automatic newline whengetAutonli()
and notgetAtnl()
, followed by automatic indentation when enabled.autoNli
(int depthOffset) Performs automatic newline whengetAutonli()
and notgetAtnl()
, followed by automatic indentation with a depth offset when enabled.Clears the at newline flag.decDepth()
boolean
getAtnl()
Gets the at newline flag.boolean
Gets if automatic newline (and indentation when enabled) is currently enabled, off by default.Deprecated.This method will remain, but its use is discouraged as it can be dangerousgetRawUnsafe
(Boolean endsNewline) Deprecated.This method will remain, but its use is discouraged as it can be dangerousincDepth()
default DocumentWriter
indent()
default DocumentWriter
indent
(int depthOffset) nl()
default DocumentWriter
nli()
default DocumentWriter
nli
(int depthOffset) setAtnl()
Flags is at a newline.setAtnl
(boolean atnl) Sets the at newline flag.setAutonli
(boolean autonli) Enables or disabled automatic newline (and indentation when enabled).setDepth
(int depth) setIndent
(boolean indent) default DocumentWriter
sp()
sp
(int count) unsafe()
Deprecated.This method will remain, but its use is discouraged as it can be dangerousunsafe
(char ch) Deprecated.This method will remain, but its use is discouraged as it can be dangerousunsafe
(char[] cbuf) Deprecated.This method will remain, but its use is discouraged as it can be dangerousunsafe
(char[] cbuf, int offset, int len) Deprecated.This method will remain, but its use is discouraged as it can be dangerous<Ex extends Throwable>
DocumentWriterunsafe
(IOSupplierE<?, Ex> unsafe) Deprecated.This method will remain, but its use is discouraged as it can be dangerousDeprecated.This method will remain, but its use is discouraged as it can be dangerousunsafe
(CharSequence csq) Deprecated.This method will remain, but its use is discouraged as it can be dangerousunsafe
(CharSequence csq, int start, int end) Deprecated.This method will remain, but its use is discouraged as it can be dangerousDeprecated.This method will remain, but its use is discouraged as it can be dangerousMethods inherited from interface com.aoapps.encoding.Whitespace
getDepth, getIndent
-
Method Details
-
nl
- Specified by:
nl
in interfaceWhitespace
- Throws:
IOException
-
nli
- Specified by:
nli
in interfaceWhitespace
- Throws:
IOException
-
nli
- Specified by:
nli
in interfaceWhitespace
- Throws:
IOException
-
indent
- Specified by:
indent
in interfaceWhitespace
- Throws:
IOException
-
indent
- Specified by:
indent
in interfaceWhitespace
- Throws:
IOException
-
setIndent
- Specified by:
setIndent
in interfaceWhitespace
-
setDepth
- Specified by:
setDepth
in interfaceWhitespace
-
incDepth
DocumentWriter incDepth()- Specified by:
incDepth
in interfaceWhitespace
-
decDepth
DocumentWriter decDepth()- Specified by:
decDepth
in interfaceWhitespace
-
sp
- Specified by:
sp
in interfaceWhitespace
- Throws:
IOException
-
sp
- Specified by:
sp
in interfaceWhitespace
- Throws:
IOException
-
getRawUnsafe
Deprecated.This method will remain, but its use is discouraged as it can be dangerousGets the current writer this document is writing to, which may be used for raw output.Please prefer
unsafe()
, which is compatible with try-with-resources blocks. The writer returned here is the real, underlying writer.- Parameters:
endsNewline
- Indicates whether the data that will be written will end in aWhitespace.NL
. When non-null, will callsetAtnl(boolean)
with the given value.- Returns:
- The writer, already optimized via
Coercion.optimize(java.io.Writer, com.aoapps.lang.io.Encoder)
withencoder = null
. - Throws:
IllegalStateException
- when output has been set tonull
.- See Also:
-
getRawUnsafe
Deprecated.This method will remain, but its use is discouraged as it can be dangerousGets the current writer this document is writing to, which may be used for raw output.Please prefer
unsafe()
, which is compatible with try-with-resources blocks. The writer returned here is the real, underlying writer.With no knowledge of what will be written, calls
clearAtnl()
to be safe.- Returns:
- The writer, already optimized via
Coercion.optimize(java.io.Writer, com.aoapps.lang.io.Encoder)
withencoder = null
. - Throws:
IllegalStateException
- when output has been set tonull
.- See Also:
-
unsafe
Deprecated.This method will remain, but its use is discouraged as it can be dangerousPerforms raw output of a single character, automatically determiningsetAtnl(boolean)
.- Returns:
this
writer- Throws:
IOException
-
unsafe
Deprecated.This method will remain, but its use is discouraged as it can be dangerousPerforms raw output, automatically determiningsetAtnl(boolean)
.- Returns:
this
writer- Throws:
IOException
-
unsafe
Deprecated.This method will remain, but its use is discouraged as it can be dangerousPerforms raw output, automatically determiningsetAtnl(boolean)
.- Returns:
this
writer- Throws:
IOException
-
unsafe
Deprecated.This method will remain, but its use is discouraged as it can be dangerousPerforms raw output, automatically determiningsetAtnl(boolean)
.- Returns:
this
writer- Throws:
IOException
-
unsafe
Deprecated.This method will remain, but its use is discouraged as it can be dangerousPerforms raw output, automatically determiningsetAtnl(boolean)
.- Returns:
this
writer- Throws:
IOException
-
unsafe
Deprecated.This method will remain, but its use is discouraged as it can be dangerousPerforms raw output, automatically determiningsetAtnl(boolean)
.When no knowledge of what will be written, calls
clearAtnl()
to be safe.- Returns:
this
writer- Throws:
IOException
-
unsafe
@Deprecated <Ex extends Throwable> DocumentWriter unsafe(IOSupplierE<?, Ex> unsafe) throws IOException, ExDeprecated.This method will remain, but its use is discouraged as it can be dangerousPerforms raw output, automatically determiningsetAtnl(boolean)
.When no knowledge of what will be written, calls
clearAtnl()
to be safe.- Type Parameters:
Ex
- An arbitrary exception type that may be thrown- Returns:
this
writer- Throws:
IOException
Ex
-
unsafe
Deprecated.This method will remain, but its use is discouraged as it can be dangerousPerforms raw output.With no knowledge of what will be written, calls
clearAtnl()
to be safe.- Returns:
this
writer- Throws:
IOException
-
unsafe
Deprecated.This method will remain, but its use is discouraged as it can be dangerousPerforms raw output. This is well suited for use in a try-with-resources block.With no knowledge of what will be written, calls
clearAtnl()
to be safe.- Returns:
- a writer for direct output, which will ignore any calls to
Writer.close()
to be safely used in a try-with-resources block. - Throws:
IOException
-
getAutonli
boolean getAutonli()Gets if automatic newline (and indentation when enabled) is currently enabled, off by default. -
setAutonli
Enables or disabled automatic newline (and indentation when enabled).- Returns:
this
writer
-
getAtnl
boolean getAtnl()Gets the at newline flag. -
setAtnl
DocumentWriter setAtnl()Flags is at a newline.- Returns:
this
writer
-
setAtnl
Sets the at newline flag.- Returns:
this
writer
-
clearAtnl
DocumentWriter clearAtnl()Clears the at newline flag.- Returns:
this
writer
-
autoNl
Performs automatic newline whengetAutonli()
and notgetAtnl()
.- Returns:
this
writer- Throws:
IOException
-
autoNli
Performs automatic newline whengetAutonli()
and notgetAtnl()
, followed by automatic indentation when enabled.- Returns:
this
writer- Throws:
IOException
-
autoNli
Performs automatic newline whengetAutonli()
and notgetAtnl()
, followed by automatic indentation with a depth offset when enabled.- Parameters:
depthOffset
- A value added to the current indentation depth. For example, pass-1
when performing a newline before a closing tag or ending curly brace.- Returns:
this
writer- Throws:
IOException
-
autoIndent
- Returns:
this
writer- Throws:
IOException
-
autoIndent
Performs automatic indentation with a depth offset whengetAutonli()
,Whitespace.getIndent()
, andgetAtnl()
.- Parameters:
depthOffset
- A value added to the current indentation depth. For example, pass-1
when performing a newline before a closing tag or ending curly brace.- Returns:
this
writer- Throws:
IOException
-