1 22 23 package com.ice.jni.registry; 24 25 import java.io.PrintWriter ; 26 27 28 35 36 public class 37 RegBinaryValue extends RegistryValue 38 { 39 byte[] data; 40 int dataLen; 41 42 43 public 44 RegBinaryValue( RegistryKey key, String name ) 45 { 46 super( key, name, RegistryValue.REG_BINARY ); 47 this.data = null; 48 this.dataLen = 0; 49 } 50 51 public 52 RegBinaryValue( RegistryKey key, String name, int type ) 53 { 54 super( key, name, type ); 55 this.data = null; 56 this.dataLen = 0; 57 } 58 59 public 60 RegBinaryValue( RegistryKey key, String name, byte[] data ) 61 { 62 super( key, name, RegistryValue.REG_BINARY ); 63 this.setData( data ); 64 } 65 66 public byte[] 67 getData() 68 { 69 return this.data; 70 } 71 72 public int 73 getLength() 74 { 75 return this.dataLen; 76 } 77 78 public void 79 setData( byte[] data ) 80 { 81 this.data = data; 82 this.dataLen = data.length; 83 } 84 85 public byte[] 86 getByteData() 87 { 88 return this.data; 89 } 90 91 public int 92 getByteLength() 93 { 94 return this.dataLen; 95 } 96 97 public void 98 setByteData( byte[] data ) 99 { 100 this.data = data; 101 this.dataLen = data.length; 102 } 103 104 public void 105 export( PrintWriter out ) 106 { 107 out.println( "\"" + this.getName() + "\"=hex:\\" ); 108 RegistryValue.exportHexData( out, this.data ); 109 } 110 111 } 112 113 114 115 116 | Popular Tags |