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

📄 regbinaryvalue.java

📁 注册表的读取信息,工具文件包
💻 JAVA
字号:
/*
** Java native interface to the Windows Registry API.
** 
** Authored by Timothy Gerard Endres
** <mailto:time@gjt.org>  <http://www.trustice.com>
** 
** This work has been placed into the public domain.
** You may use this work in any way and for any purpose you wish.
**
** THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND,
** NOT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR
** OF THIS SOFTWARE, ASSUMES _NO_ RESPONSIBILITY FOR ANY
** CONSEQUENCE RESULTING FROM THE USE, MODIFICATION, OR
** REDISTRIBUTION OF THIS SOFTWARE. 
** 
*/

package com.ice.jni.registry;

import java.io.OutputStreamWriter;
import java.io.PrintWriter;


/**
 * The RegBinaryValue class represents a binary value in the
 * registry (REG_BINARY).
 *
 * @version 3.1.3
 *
 * @see com.ice.jni.registry.Registry
 * @see com.ice.jni.registry.RegistryKey
 */

public class
RegBinaryValue extends RegistryValue
	{
	byte[]		data;
	int			dataLen;


	public
	RegBinaryValue( RegistryKey key, String name )
		{
		super( key, name, RegistryValue.REG_BINARY );
		this.data = null;
		this.dataLen = 0;
		}

	public
	RegBinaryValue( RegistryKey key, String name, int type )
		{
		super( key, name, type );
		this.data = null;
		this.dataLen = 0;
		}

	public
	RegBinaryValue( RegistryKey key, String name, byte[] data )
		{
		super( key, name, RegistryValue.REG_BINARY );
		this.setData( data );
		}

	public byte[]
	getData()
		{
		return this.data;
		}

	public int
	getLength()
		{
		return this.dataLen;
		}

	public void
	setData( byte[] data )
		{
		this.data = data;
		this.dataLen = data.length;
		}

	public byte[]
	getByteData()
		{
		return this.data;
		}

	public int
	getByteLength()
		{
		return this.dataLen;
		}

	public void
	setByteData( byte[] data )
		{
		this.data = data;
		this.dataLen = data.length;
		}

	public void
	export( PrintWriter out )
		{
		out.println( "\"" + this.getName() + "\"=hex:\\" );
		RegistryValue.exportHexData( out, this.data );
		}

	}




⌨️ 快捷键说明

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