| |
|
| java.lang.Object sun.security.jgss.GSSHeader
GSSHeader | public class GSSHeader (Code) | | This class represents the mechanism independent part of a GSS-API
context establishment token. Some mechanisms may choose to encode
all subsequent tokens as well such that they start with an encoding
of an instance of this class. e.g., The Kerberos v5 GSS-API Mechanism
uses this header for all GSS-API tokens.
The format is specified in RFC 2743 section 3.1.
author: Mayank Upadhyay version: 1.13, 05/05/07 |
Field Summary | |
final public static int | TOKEN_ID The tag defined in the GSS-API mechanism independent token
format. |
Constructor Summary | |
public | GSSHeader(ObjectIdentifier mechOid, int mechTokenLength) Creates a GSSHeader instance whose encoding can be used as the
prefix for a particular mechanism token. | public | GSSHeader(InputStream is) Reads in a GSSHeader from an InputStream. |
Method Summary | |
public int | encode(OutputStream os) Encodes this GSSHeader instance onto the provided OutputStream.
Parameters: os - the OutputStream to which the token should be written. | public int | getLength() Used to obtain the length of the encoding of this GSSHeader. | public static int | getMaxMechTokenSize(ObjectIdentifier mechOid, int maxTotalSize) Used to determine what the maximum possible mechanism token
size is if the complete GSSToken returned to the application
(including a GSSHeader) is not to exceed some pre-determined
value in size. | public int | getMechTokenLength() Used to obtain the length of the mechanism specific token that
will follow the encoding of this GSSHeader instance. | public ObjectIdentifier | getOid() Used to obtain the Oid stored in this GSSHeader instance. |
TOKEN_ID | final public static int TOKEN_ID(Code) | | The tag defined in the GSS-API mechanism independent token
format.
|
GSSHeader | public GSSHeader(ObjectIdentifier mechOid, int mechTokenLength) throws IOException(Code) | | Creates a GSSHeader instance whose encoding can be used as the
prefix for a particular mechanism token.
Parameters: mechOid - the Oid of the mechanism which generated the token Parameters: mechTokenLength - the length of the subsequent portion thatthe mechanism will be adding. |
GSSHeader | public GSSHeader(InputStream is) throws IOException, GSSException(Code) | | Reads in a GSSHeader from an InputStream. Typically this would be
used as part of reading the complete token from an InputStream
that is obtained from a socket.
|
encode | public int encode(OutputStream os) throws IOException(Code) | | Encodes this GSSHeader instance onto the provided OutputStream.
Parameters: os - the OutputStream to which the token should be written. the number of bytes that are output as a result of thisencoding |
getLength | public int getLength()(Code) | | Used to obtain the length of the encoding of this GSSHeader.
the lenght of the encoding of this GSSHeader instance. |
getMaxMechTokenSize | public static int getMaxMechTokenSize(ObjectIdentifier mechOid, int maxTotalSize)(Code) | | Used to determine what the maximum possible mechanism token
size is if the complete GSSToken returned to the application
(including a GSSHeader) is not to exceed some pre-determined
value in size.
Parameters: mechOid - the Oid of the mechanism that will generatethis GSS-API token Parameters: maxTotalSize - the pre-determined value that serves as amaximum size for the complete GSS-API token (including aGSSHeader) the maximum size of mechanism token that can be usedso as to not exceed maxTotalSize with the GSS-API token |
getMechTokenLength | public int getMechTokenLength()(Code) | | Used to obtain the length of the mechanism specific token that
will follow the encoding of this GSSHeader instance.
the length of the mechanism specific token portion thatwill follow this GSSHeader. |
getOid | public ObjectIdentifier getOid()(Code) | | Used to obtain the Oid stored in this GSSHeader instance.
the Oid of the mechanism. |
|
|
|