Android
android.content.pm
public class

android.content.pm.Signature

java.lang.Object
android.content.pm.Signature Parcelable

Opaque, immutable representation of a signature associated with an application package.

Summary

Constants

      Value  
Creator<Signature CREATOR       
Constants inherited from interface android.os.Parcelable

Public Constructors

            Signature(byte[] signature)
Create Signature from an existing raw byte array.
            Signature(String text)
Create Signature from a text representation previously returned by toChars() or toCharsString().

Public Methods

          int  describeContents()
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
          boolean  equals(Object obj)
Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison.
          int  hashCode()
Returns an integer hash code for the receiver.
          byte[]  toByteArray()
          char[]  toChars(char[] existingArray, int[] outLen)
Encode the Signature as ASCII text in to an existing array.
          char[]  toChars()
Encode the Signature as ASCII text.
          String  toCharsString()
Return the result of toChars() as a String.
          void  writeToParcel(Parcel dest, int parcelableFlags)
Flatten this object in to a Parcel.
Methods inherited from class java.lang.Object
Methods inherited from interface android.os.Parcelable

Details

Constants

public static final Creator<Signature> CREATOR

Public Constructors

public Signature(byte[] signature)

Create Signature from an existing raw byte array.

public Signature(String text)

Create Signature from a text representation previously returned by toChars() or toCharsString().

Public Methods

public int describeContents()

Describe the kinds of special objects contained in this Parcelable's marshalled representation.

public boolean equals(Object obj)

Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison. The implementation in Object returns true only if the argument is the exact same object as the receiver (==).

Parameters

obj Object the object to compare with this object.

Returns

  • boolean true if the object is the same as this object false if it is different from this object.

public int hashCode()

Returns an integer hash code for the receiver. Any two objects which answer true when passed to .equals must answer the same value for this method.

Returns

  • int the receiver's hash.

public byte[] toByteArray()

Returns

  • the contents of this signature as a byte array.

public char[] toChars(char[] existingArray, int[] outLen)

Encode the Signature as ASCII text in to an existing array.

Parameters

existingArray Existing char array or null.
outLen Output parameter for the number of characters written in to the array.

Returns

  • Returns either existingArray if it was large enough to hold the ASCII representation, or a newly created char[] array if needed.

public char[] toChars()

Encode the Signature as ASCII text.

public String toCharsString()

Return the result of toChars() as a String. This result is cached so future calls will return the same String.

public void writeToParcel(Parcel dest, int parcelableFlags)

Flatten this object in to a Parcel.
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:56