本文整理了Java中aQute.lib.hex.Hex.nibble()
方法的一些代码示例,展示了Hex.nibble()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Hex.nibble()
方法的具体详情如下:
包路径:aQute.lib.hex.Hex
类名称:Hex
方法名:nibble
暂无
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
public final static void append(Appendable sb, byte[] data) throws IOException {
for (int i = 0; i < data.length; i++) {
sb.append(nibble(data[i] >> 4));
sb.append(nibble(data[i]));
}
}
代码示例来源:origin: biz.aQute.bnd/bndlib
public final static void append(Appendable sb, byte[] data) throws IOException {
for (int i = 0; i < data.length; i++) {
sb.append(nibble(data[i] >> 4));
sb.append(nibble(data[i]));
}
}
代码示例来源:origin: org.osgi/osgi.enroute.authenticator.simple.provider
public final static void append(Appendable sb, byte[] data) throws IOException {
for (int i = 0; i < data.length; i++) {
sb.append(nibble(data[i] >> 4));
sb.append(nibble(data[i]));
}
}
代码示例来源:origin: biz.aQute/bndlib
public final static void append(Appendable sb, byte[] data) throws IOException {
for (int i = 0; i < data.length; i++) {
sb.append(nibble(data[i] >> 4));
sb.append(nibble(data[i]));
}
}
代码示例来源:origin: biz.aQute/bnd
public final static void append( Appendable sb, byte [] data ) throws IOException {
for ( int i =0; i<data.length; i++) {
sb.append( nibble( data[i] >> 4));
sb.append( nibble( data[i]));
}
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.repository
public final static void append(Appendable sb, byte[] data) throws IOException {
for (int i = 0; i < data.length; i++) {
sb.append(nibble(data[i] >> 4));
sb.append(nibble(data[i]));
}
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.resolve
public final static void append(Appendable sb, byte[] data) throws IOException {
for (int i = 0; i < data.length; i++) {
sb.append(nibble(data[i] >> 4));
sb.append(nibble(data[i]));
}
}
代码示例来源:origin: org.osgi/osgi.enroute.rest.simple.provider
private String reverseEncode(char c, Predicate<Character> predicate) {
if (c == '-')
return "_";
if (c == '_')
return "$5F";
if ( predicate.test(c))
return Character.toString(c);
if ( c > 0x7F)
return "~";
return "$" + Hex.nibble( c / 16) + Hex.nibble(c%16);
}
}
代码示例来源:origin: biz.aQute.bnd/bnd
public final static void append(Appendable sb, byte[] data) throws IOException {
for (int i = 0; i < data.length; i++) {
sb.append(nibble(data[i] >> 4));
sb.append(nibble(data[i]));
}
}
代码示例来源:origin: org.osgi/osgi.enroute.easse.simple.adapter
public final static void append(Appendable sb, byte[] data) throws IOException {
for (int i = 0; i < data.length; i++) {
sb.append(nibble(data[i] >> 4));
sb.append(nibble(data[i]));
}
}
代码示例来源:origin: org.osgi/osgi.enroute.rest.simple.provider
public final static void append(Appendable sb, byte[] data) throws IOException {
for (int i = 0; i < data.length; i++) {
sb.append(nibble(data[i] >> 4));
sb.append(nibble(data[i]));
}
}
代码示例来源:origin: org.osgi/osgi.enroute.rest.simple.provider
public final static byte[] toByteArray(String string) {
string = string.trim();
if ((string.length() & 1) != 0)
throw new IllegalArgumentException("a hex string must have an even length");
byte[] out = new byte[string.length() / 2];
for (int i = 0; i < out.length; i++) {
int high = nibble(string.charAt(i * 2)) << 4;
int low = nibble(string.charAt(i * 2 + 1));
out[i] = (byte) (high + low);
}
return out;
}
代码示例来源:origin: org.osgi/osgi.enroute.jsonrpc.simple.provider
public final static byte[] toByteArray(String string) {
string = string.trim();
if ((string.length() & 1) != 0)
throw new IllegalArgumentException("a hex string must have an even length");
byte[] out = new byte[string.length() / 2];
for (int i = 0; i < out.length; i++) {
int high = nibble(string.charAt(i * 2)) << 4;
int low = nibble(string.charAt(i * 2 + 1));
out[i] = (byte) (high + low);
}
return out;
}
代码示例来源:origin: biz.aQute.bnd/bnd
public final static byte[] toByteArray(String string) {
string = string.trim();
if ((string.length() & 1) != 0)
throw new IllegalArgumentException("a hex string must have an even length");
byte[] out = new byte[string.length() / 2];
for (int i = 0; i < out.length; i++) {
int high = nibble(string.charAt(i * 2)) << 4;
int low = nibble(string.charAt(i * 2 + 1));
out[i] = (byte) (high + low);
}
return out;
}
代码示例来源:origin: biz.aQute/bndlib
public final static byte[] toByteArray(String string) {
string = string.trim();
if ((string.length() & 1) != 0)
throw new IllegalArgumentException("a hex string must have an even length");
byte[] out = new byte[string.length() / 2];
for (int i = 0; i < out.length; i++) {
int high = nibble(string.charAt(i * 2)) << 4;
int low = nibble(string.charAt(i * 2 + 1));
out[i] = (byte) (high + low);
}
return out;
}
代码示例来源:origin: org.osgi/osgi.enroute.dtos.bndlib.provider
public final static byte[] toByteArray(String string) {
string = string.trim();
if ((string.length() & 1) != 0)
throw new IllegalArgumentException("a hex string must have an even length");
byte[] out = new byte[string.length() / 2];
for (int i = 0; i < out.length; i++) {
int high = nibble(string.charAt(i * 2)) << 4;
int low = nibble(string.charAt(i * 2 + 1));
out[i] = (byte) (high + low);
}
return out;
}
代码示例来源:origin: org.osgi/osgi.enroute.web.simple.provider
public final static byte[] toByteArray(String string) {
string = string.trim();
if ((string.length() & 1) != 0)
throw new IllegalArgumentException("a hex string must have an even length");
byte[] out = new byte[string.length() / 2];
for (int i = 0; i < out.length; i++) {
int high = nibble(string.charAt(i * 2)) << 4;
int low = nibble(string.charAt(i * 2 + 1));
out[i] = (byte) (high + low);
}
return out;
}
代码示例来源:origin: biz.aQute.bnd/bndlib
public final static byte[] toByteArray(String string) {
string = string.trim();
if ((string.length() & 1) != 0)
throw new IllegalArgumentException("a hex string must have an even length");
byte[] out = new byte[string.length() / 2];
for (int i = 0; i < out.length; i++) {
int high = nibble(string.charAt(i * 2)) << 4;
int low = nibble(string.charAt(i * 2 + 1));
out[i] = (byte) (high + low);
}
return out;
}
代码示例来源:origin: biz.aQute/bnd
public final static byte[] toByteArray(String string) {
string = string.trim();
if ( (string.length() & 1) != 0)
throw new IllegalArgumentException("a hex string must have an even length");
byte[]out = new byte[ string.length()/2];
for ( int i=0; i < out.length; i++) {
out[i] = (byte) (nibble(string.charAt(i*2))<<4 + nibble(string.charAt(i*2+1)));
}
return out;
}
代码示例来源:origin: org.osgi/osgi.enroute.authenticator.simple.provider
public final static byte[] toByteArray(String string) {
string = string.trim();
if ((string.length() & 1) != 0)
throw new IllegalArgumentException("a hex string must have an even length");
byte[] out = new byte[string.length() / 2];
for (int i = 0; i < out.length; i++) {
int high = nibble(string.charAt(i * 2)) << 4;
int low = nibble(string.charAt(i * 2 + 1));
out[i] = (byte) (high + low);
}
return out;
}
内容来源于网络,如有侵权,请联系作者删除!