The MACOutputStream class provides streaming functionality with
a Message Authentication Code MAC
by allowing for write calls to an underlying output stream
and passing this information through the MAC as it is being
written.
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
MACOutputStream(MAC mac,
OutputStream out)
Creates a MACOutputStream object using a MAC that the user wants
and an output stream that all data will be written to.
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
_on
protected boolean _on
Determines whether or not information
that is written to the output stream should be passed through the
MAC beforehand. By default, _on is set to true.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Creates a MACOutputStream object using a MAC that the user wants
and an output stream that all data will be written to.
Parameters:
mac - The MAC object to use with this output stream.
out - The underlying output stream that all data.
will be written to. If this is null, no output stream will be used,
allowing just the MAC features to be used.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
on
public void on(boolean on)
Allows the programmer to turn the MAC functionality
of the stream on or off at will. The "on" boolean will determine
whether information that is written will be passed through the MAC before
being written to the stream.
Note that _on is set to true by default.
Parameters:
on - A boolean stating whether the MAC is on (true) or off (false).
Since:
JDE 4.0.2
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
write
public void write(byte[] buffer,
int offset,
int length)
throws IOException
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Returns a reference to the MAC object being used in this instance of the
class.
Returns:
The current MAC object.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Copyright 1999-2004 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved. Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. Copyright 2002-2003 Nokia Corporation All Rights Reserved. Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.