public class RemoveHTMLTags extends FilterReader
ReplaceHTMLTokens
Usage Example:
in = new BufferedReader(
new ReplaceTokens(
new RemoveHTMLTags(
new CharArrayReader(content.toCharArray()))));
Copyright (c) SAP AG 2001-2002 Company: SAP AGModifier and Type | Field and Description |
---|---|
static String |
newline |
in
Constructor and Description |
---|
RemoveHTMLTags(Reader in)
|
Modifier and Type | Method and Description |
---|---|
void |
addEntity(String entity,
String substitute)
Defines an entity substitution set.
|
void |
addSubstitute(String tag,
String substitute)
Defines a tag substitution set.
|
void |
clearEntities()
Tells the filter to clear all current entity substitutions
|
void |
clearSubstitutes()
Tells the filter to clear all current tag substitutions.
|
boolean |
getNoCR()
You can tell the filter to remove carraige returns (\n and \r) when
parsing.
|
static void |
main(String[] args)
The main program for test
|
int |
read()
Reads a char.
|
int |
read(char[] b,
int off,
int len)
read
|
void |
setCompressSpace(boolean flag)
Define whether multiple spaces should be compressed into a single space.
|
void |
setNoCR(boolean flag)
You can tell the filter to remove carraige returns (\n and \r) when
parsing.
|
void |
useStandardEntities()
Tells the filter to set up a standard entity substitution set.
|
void |
useStandardSubstitutes()
Tells the filter to set up a standard tag substitution set.
|
close, mark, markSupported, ready, reset, skip
public static String newline
public RemoveHTMLTags(Reader in)
in
- parameter for public int read(char[] b, int off, int len) throws IOException
read
in class FilterReader
len
- parameter for readb
- TBD: Description of the incoming method parameteroff
- TBD: Description of the incoming method parameterIOException
- -public int read() throws IOException
read
in class FilterReader
IOException
- If an I/O error has occurred.InputStream.read()
public void addEntity(String entity, String substitute) throws NullPointerException
entity
- - the entity to substitute. Example: quot, #90, copy.substitute
- - string to sub for the entity.NullPointerException
useStandardEntities()
public void addSubstitute(String tag, String substitute) throws NullPointerException
tag
- - the tag to substitute. Use base tag without attributes.substitute
- - string to sub for tag.NullPointerException
useStandardSubstitutes()
public void useStandardSubstitutes()
public void useStandardEntities()
public void clearSubstitutes()
public void clearEntities()
public void setCompressSpace(boolean flag)
flag
- public void setNoCR(boolean flag)
flag
- - remove carraige returns during parse and substitue spacespublic boolean getNoCR()
public static void main(String[] args)
args
- The command line argumentsAccess Rights |
---|
SC | DC | Public Part | ACH |
---|---|---|---|
[sap.com] KMC-CM
|
[sap.com] tc/km/frwk
|
api
|
EP-KM-CM
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
Copyright 2018 SAP AG Complete Copyright Notice