Methods Summary |
---|
public int | describeContents()
return 0;
|
public boolean | equals(java.lang.Object obj)
try {
if (obj != null) {
Signature other = (Signature)obj;
return Arrays.equals(mSignature, other.mSignature);
}
} catch (ClassCastException e) {
}
return false;
|
public int | hashCode()
if (mHaveHashCode) {
return mHashCode;
}
mHashCode = Arrays.hashCode(mSignature);
mHaveHashCode = true;
return mHashCode;
|
public byte[] | toByteArray()
byte[] bytes = new byte[mSignature.length];
System.arraycopy(mSignature, 0, bytes, 0, mSignature.length);
return bytes;
|
public char[] | toChars()Encode the Signature as ASCII text.
return toChars(null, null);
|
public char[] | toChars(char[] existingArray, int[] outLen)Encode the Signature as ASCII text in to an existing array.
byte[] sig = mSignature;
final int N = sig.length;
final int N2 = N*2;
char[] text = existingArray == null || N2 > existingArray.length
? new char[N2] : existingArray;
for (int j=0; j<N; j++) {
byte v = sig[j];
int d = (v>>4)&0xf;
text[j*2] = (char)(d >= 10 ? ('a" + d - 10) : ('0" + d));
d = v&0xf;
text[j*2+1] = (char)(d >= 10 ? ('a" + d - 10) : ('0" + d));
}
if (outLen != null) outLen[0] = N;
return text;
|
public java.lang.String | toCharsString()Return the result of {@link #toChars()} as a String. This result is
cached so future calls will return the same String.
if (mString != null) return mString;
String str = new String(toChars());
mString = str;
return mString;
|
public void | writeToParcel(android.os.Parcel dest, int parcelableFlags)
dest.writeByteArray(mSignature);
|