⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 useridpacket.java

📁 面向应用的智能安全代理平台和工具包是一个综合网络应用的安全共性需求而设计和实现的一个通用性的网络信息安全应用支撑平台
💻 JAVA
字号:
package au.net.aba.pgp;

/*
 * $Id: UserIDPacket.java,v 1.2 1998/10/19 06:32:42 leachbj Exp $
 * $Author: leachbj $
 *
 * Copyright (C) 1996-1998 Australian Business Access Pty Ltd.
 * All rights reserved.
 * 
 * Use, modification, copying and distribution of this software is subject the
 * terms and conditions of the ABA Public Licence. See the file
 * "PUBLIC_LICENCE" for additional information.
 *
 * If you have not received a copy of the Public Licence, you must destroy all
 * copies of this file immediately. 
 *
 * $Source: /aba/CVSROOT/jdk1.1/src/au.net.aba/pgp/UserIDPacket.java,v $
 * $Revision: 1.2 $
 * $Date: 1998/10/19 06:32:42 $
 * $State: Exp $
 */

import java.io.*;


//
// User ID packet.
//

class UserIDPacket extends Packet
{
	public final static String ident = "$Id: UserIDPacket.java,v 1.2 1998/10/19 06:32:42 leachbj Exp $";

	public String user;			// user id


	//
	// Construct from an input stream.
	// Assumes the cipher byte type has already been read.
	// 
	public UserIDPacket (InputStream input)
		throws IOException
	{
		// build packet input stream
		DataInputStream data = buildCipherPacketInputStream (
			input,(byte)0x0d,
			"user id packet expected");

		// read string
		StringBuffer buffer = new StringBuffer ();
		try {
			while (true){
				char c = (char)data.readByte ();
				buffer.append (c);
			}
		}
		catch (EOFException e){
			user = new String (buffer);
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -