当前位置: 首页>>代码示例>>Java>>正文


Java CCacheOutputStream.write32方法代码示例

本文整理汇总了Java中sun.security.krb5.internal.ccache.CCacheOutputStream.write32方法的典型用法代码示例。如果您正苦于以下问题:Java CCacheOutputStream.write32方法的具体用法?Java CCacheOutputStream.write32怎么用?Java CCacheOutputStream.write32使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sun.security.krb5.internal.ccache.CCacheOutputStream的用法示例。


在下文中一共展示了CCacheOutputStream.write32方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: writePrincipal

import sun.security.krb5.internal.ccache.CCacheOutputStream; //导入方法依赖的package包/类
/**
 * Writes data field values of <code>PrincipalName</code> in FCC format to an output stream.
 *
 * @param cos a <code>CCacheOutputStream</code> for writing data.
 * @exception IOException if an I/O exception occurs.
 * @see sun.security.krb5.internal.ccache.CCacheOutputStream
 */
public void writePrincipal(CCacheOutputStream cos) throws IOException {
    cos.write32(nameType);
    cos.write32(nameStrings.length);
    if (nameRealm != null) {
        byte[] realmBytes = null;
        realmBytes = nameRealm.toString().getBytes();
        cos.write32(realmBytes.length);
        cos.write(realmBytes, 0, realmBytes.length);
    }
    byte[] bytes = null;
    for (int i = 0; i < nameStrings.length; i++) {
        bytes = nameStrings[i].getBytes();
        cos.write32(bytes.length);
        cos.write(bytes, 0, bytes.length);
    }
}
 
开发者ID:openjdk,项目名称:jdk7-jdk,代码行数:24,代码来源:PrincipalName.java

示例2: writeAddrs

import sun.security.krb5.internal.ccache.CCacheOutputStream; //导入方法依赖的package包/类
/**
     * Writes data field values in <code>HostAddresses</code> in FCC
     * format to a <code>CCacheOutputStream</code>.
     *
     * @param cos a <code>CCacheOutputStream</code> to be written to.
     * @exception IOException if an I/O exception occurs.
     * @see sun.security.krb5.internal.ccache.CCacheOutputStream
     */

public void writeAddrs(CCacheOutputStream cos) throws IOException {
    cos.write32(addresses.length);
    for (int i = 0; i < addresses.length; i++) {
        cos.write16(addresses[i].addrType);
        cos.write32(addresses[i].address.length);
        cos.write(addresses[i].address, 0,
                  addresses[i].address.length);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:HostAddresses.java

示例3: writePrincipal

import sun.security.krb5.internal.ccache.CCacheOutputStream; //导入方法依赖的package包/类
/**
 * Writes data field values of <code>PrincipalName</code> in FCC format to an output stream.
 *
 * @param cos a <code>CCacheOutputStream</code> for writing data.
 * @exception IOException if an I/O exception occurs.
 * @see sun.security.krb5.internal.ccache.CCacheOutputStream
 */
public void writePrincipal(CCacheOutputStream cos) throws IOException {
    cos.write32(nameType);
    cos.write32(nameStrings.length);
    byte[] realmBytes = null;
    realmBytes = nameRealm.toString().getBytes();
    cos.write32(realmBytes.length);
    cos.write(realmBytes, 0, realmBytes.length);
    byte[] bytes = null;
    for (int i = 0; i < nameStrings.length; i++) {
        bytes = nameStrings[i].getBytes();
        cos.write32(bytes.length);
        cos.write(bytes, 0, bytes.length);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:22,代码来源:PrincipalName.java

示例4: writeKey

import sun.security.krb5.internal.ccache.CCacheOutputStream; //导入方法依赖的package包/类
/**
 * Writes key value in FCC format to a <code>CCacheOutputStream</code>.
 *
 * @param cos a <code>CCacheOutputStream</code> to be written to.
 * @exception IOException if an I/O exception occurs.
 * @see sun.security.krb5.internal.ccache.CCacheOutputStream
 *
 */
public synchronized void writeKey(CCacheOutputStream cos)
    throws IOException {

    cos.write16(keyType);
    // we use KRB5_FCC_FVNO_3
    cos.write16(keyType); // key type is recorded twice.
    cos.write32(keyValue.length);
    for (int i = 0; i < keyValue.length; i++) {
        cos.write8(keyValue[i]);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:EncryptionKey.java

示例5: writeAddrs

import sun.security.krb5.internal.ccache.CCacheOutputStream; //导入方法依赖的package包/类
/**
     * Writes data field values in <code>HostAddresses</code> in FCC
     * format to a <code>CCacheOutputStream</code>.
     *
     * @param cos a <code>CCacheOutputStream</code> to be written to.
     * @exception IOException if an I/O exception occurs.
     * @see sun.security.krb5.internal.ccache.CCacheOutputStream
     */

public void writeAddrs(CCacheOutputStream cos) throws IOException {
    if (addresses == null || addresses.length == 0) {
        cos.write32(0);
        return;
    }
    cos.write32(addresses.length);
    for (int i = 0; i < addresses.length; i++) {
        cos.write16(addresses[i].addrType);
        cos.write32(addresses[i].address.length);
        cos.write(addresses[i].address, 0,
                  addresses[i].address.length);
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:23,代码来源:HostAddresses.java

示例6: writeEntry

import sun.security.krb5.internal.ccache.CCacheOutputStream; //导入方法依赖的package包/类
/**
 * Writes the entry's data fields in FCC format to an output stream.
 *
 * @param cos a <code>CCacheOutputStream</code>.
 * @exception IOException if an I/O exception occurs.
 */
public void writeEntry(CCacheOutputStream cos) throws IOException {
    cos.write16(adType);
    cos.write32(adData.length);
    cos.write(adData, 0, adData.length);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:AuthorizationDataEntry.java


注:本文中的sun.security.krb5.internal.ccache.CCacheOutputStream.write32方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。