public class TNEFInputStream
extends java.lang.Object
TNEFInputStream class provides low-level access to a TNEF
stream.| Constructor and Description |
|---|
TNEFInputStream(java.io.File file)
Constructs a TNEFInputStream whose content is retrieved from the given
File.
|
TNEFInputStream(java.io.InputStream in)
Constructs a TNEFInputStream whose content is retrieved from the given
InputStream.
|
TNEFInputStream(java.lang.String filename)
Constructs a TNEFInputStream whose content is retrieved from the given
file.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the TNEFInputStream and underlying InputStream.
|
int |
getKey()
Returns the TNEF stream key.
|
Attr |
readAttr()
Reads a TNEF attribute from the stream.
|
protected int |
readU16()
Reads a 16-bit unsigned value from the stream.
|
protected long |
readU32()
Reads a 32-bit unsigned value from the stream.
|
protected int |
readU8()
Reads an 8-bit unsigned value from the stream.
|
public TNEFInputStream(java.io.InputStream in)
throws java.io.IOException
in - an InputStream supplying a TNEF data streamjava.io.IOException - if the input does not start with a valid TNEF signature, or
if an I/O error occurspublic TNEFInputStream(java.io.File file)
throws java.io.IOException
file - a file containing a TNEF data streamjava.io.IOException - if the input does not start with a valid TNEF signature, or
if an I/O error occurspublic TNEFInputStream(java.lang.String filename)
throws java.io.IOException
filename - the fully qualified filename of a file containing a TNEF data
streamjava.io.IOException - if the input does not start with a valid TNEF signature, or
if an I/O error occurspublic void close()
throws java.io.IOException
java.io.IOException - if an I/O error occursprotected int readU8()
throws java.io.IOException
java.io.IOException - if the stream end is reached, or if an I/O error occursprotected int readU16()
throws java.io.IOException
java.io.IOException - if the stream end is reached, or if an I/O error occursprotected long readU32()
throws java.io.IOException
java.io.IOException - if the stream end is reached, or if an I/O error occurspublic Attr readAttr() throws java.io.IOException
java.io.IOException - if the stream does not contain a valid TNEF attribute, or if
an I/O error occurspublic int getKey()
Copyright © 2022. All Rights Reserved.