public class TNEFInputStream extends Object
TNEFInputStream class provides low-level access to
a TNEF stream.| Constructor and Description |
|---|
TNEFInputStream(File file)
Constructs a TNEFInputStream whose content is retrieved from the
given File.
|
TNEFInputStream(InputStream in)
Constructs a TNEFInputStream whose content is retrieved from the
given InputStream.
|
TNEFInputStream(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(InputStream in) throws IOException
in - an InputStream supplying a TNEF data streamIOException - if the input does not start with a valid TNEF
signature, or if an I/O error occurspublic TNEFInputStream(File file) throws IOException
file - a file containing a TNEF data streamIOException - if the input does not start with a valid TNEF
signature, or if an I/O error occurspublic TNEFInputStream(String filename) throws IOException
filename - the fully qualified filename of a file containing
a TNEF data streamIOException - if the input does not start with a valid TNEF
signature, or if an I/O error occurspublic void close()
throws IOException
IOException - if an I/O error occursprotected int readU8()
throws IOException
IOException - if the stream end is reached,
or if an I/O error occursprotected int readU16()
throws IOException
IOException - if the stream end is reached,
or if an I/O error occursprotected long readU32()
throws IOException
IOException - if the stream end is reached,
or if an I/O error occurspublic Attr readAttr() throws IOException
IOException - if the stream does not contain a valid TNEF attribute,
or if an I/O error occurspublic int getKey()
This software is published under the BSD license. Copyright © 2003-${build.year}, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.