|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.beasys.commerce.axiom.document.loader.MetaParser
A utility which can pull META tags from an HTML file.
This requires the OROMatcher1.1 class library (which provides regular expression support). This library is bundled with WebLogic Server.
Field Summary | |
static java.lang.String |
attrPatStr
The Perl5 regular exprssion to find a name="value" pair. |
static java.lang.String |
metaTagPatStr
The Perl5 regular expression string for finding META tags. |
Constructor Summary | |
MetaParser()
|
Method Summary | |
static java.util.Properties |
load(java.io.BufferedReader reader,
java.util.Properties p)
Load the META tag name/value pairs from the input stream into p. |
static java.util.Properties |
load(java.io.File f,
java.util.Properties p)
Load the META tag name/value pairs from f into p. |
static java.util.Properties |
load(java.io.File f,
java.util.Properties p,
java.lang.String enc)
Load the META tag name/value pairs from f into p. |
static void |
main(java.lang.String[] args)
Little test program which grags the META tags from the first argument. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String attrPatStr
public static final java.lang.String metaTagPatStr
Constructor Detail |
public MetaParser()
Method Detail |
public static java.util.Properties load(java.io.File f, java.util.Properties p) throws java.io.IOException
f
- the file.p
- the properties object (null to create new).public static java.util.Properties load(java.io.File f, java.util.Properties p, java.lang.String enc) throws java.io.IOException
The file is assumed to be encoded in the specified encoding.
f
- the file.p
- the properties object (null to create new).enc
- the file encoding name (null for default).public static java.util.Properties load(java.io.BufferedReader reader, java.util.Properties p) throws java.io.IOException
This operates on a last-seen-is-returned alogirithm for META tags with the same name. It will also find all meta tags in file, not just those in the head.
reader
- the input reader.p
- the properties object (null to create new).public static void main(java.lang.String[] args) throws java.lang.Exception
|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |