|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.mirrorworlds.lifestreams.mail.tnef.TnefStreamParserImpl
A simple implementation of the TnefStreamParser interface. This class parses
the TNEF attributes and invokes the methods on the
TnefBuilder
to build the parsed data.
For more information (good luck), search for "TNEF Stream Syntax" and "TNEF Stream Structure" at http://www.microsoft.com
Field Summary | |
protected TnefBuilder |
builder
Tnef builder. |
Constructor Summary | |
TnefStreamParserImpl()
|
Method Summary | |
void |
debug(java.lang.String s)
|
void |
parse(java.io.InputStream inputstream)
Starts the parsing process. |
protected void |
readAttachSeq(java.io.PushbackInputStream in)
Reads a AttachSeq. |
protected void |
readAttAttributeSeq(java.io.PushbackInputStream in)
Reads a Attach_Attribute_Sequence |
protected void |
readAttMessageClass(java.io.PushbackInputStream in)
Parses Tnef MessageClass token. |
protected void |
readAttTnefVersion(java.io.PushbackInputStream in)
Parses a Tnef Version. |
protected int |
readLEInt(java.io.PushbackInputStream in)
|
protected short |
readLEShort(java.io.PushbackInputStream in)
|
protected int |
readLEUnsignedShort(java.io.PushbackInputStream in)
|
protected void |
readMessageSeq(java.io.PushbackInputStream in)
Parses a Tnef MessageSequence. |
protected boolean |
readMsgAttribute(java.io.PushbackInputStream in)
Parses Tnef MessageAttribute token. |
protected void |
readMsgAttributeSeq(java.io.PushbackInputStream in)
Parses Tnef Message Attribute Sequence token |
protected void |
readObject(java.io.PushbackInputStream in)
Parses a Tnef Object. |
void |
setBuilder(TnefBuilder builder)
Associates a builder. |
protected void |
unreadInt(java.io.PushbackInputStream in,
int b)
Unreads (pushes back)a given int (32 bit) into the pushback
stream. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected TnefBuilder builder
Constructor Detail |
public TnefStreamParserImpl()
Method Detail |
public void setBuilder(TnefBuilder builder)
builder
- TnefBuilder implementation.public void parse(java.io.InputStream inputstream) throws java.io.IOException
TnefStream = TnefSignature TnefKey TnefObject
inputstream
- TNEF message stream. eg: new FileInputStream("winmail.dat")
protected void readObject(java.io.PushbackInputStream in) throws java.io.IOException
TnefObject = MessageSequence | MessageSequence AttachSequence | AttachSequence
protected void readMessageSeq(java.io.PushbackInputStream in) throws java.io.IOException
MessageSequence =
protected void readAttTnefVersion(java.io.PushbackInputStream in) throws java.io.IOException
setTnefVersion(version)
method is invoked.
attTnefVersion = LVL_MESSAGE attTnefVerion sizeof(ulong) 0x00010000 checksum
protected void readAttMessageClass(java.io.PushbackInputStream in) throws java.io.IOException
setMessageAttribute(id,bytes)
method is invoked.
attMessageClass = LVL_MESSAGE attMessageClass length_int msg_class_data checksum
protected void readMsgAttributeSeq(java.io.PushbackInputStream in) throws java.io.IOException
MessageAttribSequence = MessageAttribute | MessageAttribute MessageAttributeSequence
protected boolean readMsgAttribute(java.io.PushbackInputStream in) throws java.io.IOException
setMessageAttribute(id,bytes)
method is invoked.
MessageAttribute = LVL_MESSAGE attribute_id attribute_length_int attrib_data checksum
protected void readAttachSeq(java.io.PushbackInputStream in) throws java.io.IOException
Attach_Seq = attRendData | attRendData Att_Attribute_Seq
protected void readAttAttributeSeq(java.io.PushbackInputStream in) throws java.io.IOException
Attach_Attribute_Seq = Att_Attribute | Att_Attribute Att_Attribute_Seq
protected short readLEShort(java.io.PushbackInputStream in) throws java.io.IOException
short
(16 bit) value read in Little Endian format.protected int readLEUnsignedShort(java.io.PushbackInputStream in) throws java.io.IOException
short
(16 bit) value read in Little Endian format.protected int readLEInt(java.io.PushbackInputStream in) throws java.io.IOException
int
(32 bit) value read in Little Endian format.protected void unreadInt(java.io.PushbackInputStream in, int b) throws java.io.IOException
int
(32 bit) into the pushback
stream.public void debug(java.lang.String s)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |