public class

PenProps

extends Object
java.lang.Object
   ↳ com.htc.painting.tool.pen.PenProps
Known Direct Subclasses

Class Overview

Pen Property Bundle is used to store all key-value properties of a pen. There are some pre-defined key with specific type. When you want to new a PenPropsBundle, you must set them.

Summary

Constants
int FLAG_IS_DEFAULT_PEN Flag which is used at KEY_FLAGS

Set it to KEY_FLAGS if this pen is the default pen

int FLAG_IS_ERASER Flag which is used at KEY_FLAGS

Set it to KEY_FLAGS if this pen is an eraser

int FLAG_IS_HIGHLIGHTER Flag which is used at KEY_FLAGS

Set it to KEY_FLAGS if this pen is the default pen

int FLAG_IS_RENDER_SUPPLIER Flag which is used at KEY_FLAGS

Set it to KEY_FLAGS if this pen is also an interface of IRenderSupplier

int FLAG_IS_SKIA_SIMPLE_PEN Flag which is used at KEY_FLAGS

Set it to KEY_FLAGS if this pen is a simple pen

String KEY_APP_PACKAGENAME The application package name which is written at AndroidManifest.xml

Type: String

Require Field: true

String KEY_BACKGROUND_RESID The pen background image resource id

Type: int

Require Field: false

String KEY_COLOR_ADJUSTABLE The user can change pen width or not

Type: boolean

Require Field: true

Default Value: true

String KEY_COLOR_DEFAULT The default pen color

Type: int

Require Field: true

Default Value: Color.BLACK

String KEY_DISPLAY_NAME_RESID The pen display name resource id

Type: long

Require Field: true

String KEY_FIXED_WIDTH_ARRAY Current pen tool box only support 5 width, if this value is set, PIM will use these width values

Type: float[]

Require Field: false

String KEY_FLAGS Some basic flags

Type: int

Require Field: true

Default Value: 0x0000

String KEY_PEN_CLASSNAME The classname which inherits com.htc.painting.tool.pen.Pen

Type: String

Require Field: true

String KEY_PEN_DISABLE_IMAGE_RESID The pen disable image resource id

Type: int

Require Field: false

String KEY_PEN_NAME The pen unique name

Type: String

Require Field: true

String KEY_SUPPORTED_COLOR_ARRAY if this value is set, PIM will use these color values only

Type: int[]

Require Field: false

String KEY_THUMBNAIL_RESID The pen thumbnail resource id

Type: int

Require Field: false

String KEY_TRANSPARENCY_ADJUSTABLE The user can adjust pen transparency or not

Type: boolean

Require Field: true

Default Value: false

String KEY_TRANSPARENCY_ALPHA_DEFAULT The transparency alpha value

Type: int

Require Field: true

Default Value: 0

Value: 0-255 (follow skia design)

String KEY_VERSION This pen version, we can use this version info to know that we shall use new pen to replace old pen or not.
String KEY_WIDTH_ADJUSTABLE The user can change pen width or not

Type: boolean

Require Field: true

Default Value: true

String KEY_WIDTH_DEFAULT The default pen width

Type: float

Require Field: true

Default Value: 25

String KEY_WIDTH_MAX The maximum available pen width

Type: float

Require Field: true

Default Value: 20

String KEY_WIDTH_MIN The minimum available pen width

Type: float

Require Field: true

Default Value: 1

Fields
protected Map<StringSerializable> mMap
Public Constructors
PenProps()
Default constructor
PenProps(byte[] bProperties)
Constructor with binary property map
PenProps(PenProps ppb)
Constructor with PenProps
Public Methods
void checkMissingKeyAndTypes()
Make sure that all key which is declared at this class has been set.
boolean containsKey(String key)
This key has been set or not
boolean equals(Object object)
Compares the specified object to this instance, and returns true if the specified object is a PenProps and both PenProps contain the same PenProps.
boolean getBoolean(String key)
Returns the value associated with the given key, or false if no mapping of the desired type exists for the given key.
boolean getBoolean(String key, boolean defaultValue)
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
boolean[] getBooleanArray(String key)
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
byte getByte(String key)
Returns the value associated with the given key, or (byte) 0 if no mapping of the desired type exists for the given key.
Byte getByte(String key, byte defaultValue)
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
byte[] getByteArray(String key)
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
char getChar(String key)
Returns the value associated with the given key, or false if no mapping of the desired type exists for the given key.
char getChar(String key, char defaultValue)
Returns the value associated with the given key, or (char) 0 if no mapping of the desired type exists for the given key.
char[] getCharArray(String key)
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
double getDouble(String key)
Returns the value associated with the given key, or 0.0 if no mapping of the desired type exists for the given key.
double getDouble(String key, double defaultValue)
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
double[] getDoubleArray(String key)
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
float getFloat(String key)
Returns the value associated with the given key, or 0.0f if no mapping of the desired type exists for the given key.
float getFloat(String key, float defaultValue)
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
float[] getFloatArray(String key)
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
int getInt(String key, int defaultValue)
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
int getInt(String key)
Returns the value associated with the given key, or 0 if no mapping of the desired type exists for the given key.
int[] getIntArray(String key)
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
long getLong(String key)
Returns the value associated with the given key, or 0L if no mapping of the desired type exists for the given key.
long getLong(String key, long defaultValue)
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
long[] getLongArray(String key)
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
short getShort(String key)
Returns the value associated with the given key, or (short) 0 if no mapping of the desired type exists for the given key.
short getShort(String key, short defaultValue)
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
short[] getShortArray(String key)
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
String getString(String key)
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
String[] getStringArray(String key)
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
void putBoolean(String key, boolean value)
Inserts a Boolean value into the mapping of this Bundle, replacing any existing value for the given key.
void putBooleanArray(String key, boolean[] value)
Inserts a boolean array value into the mapping of this Bundle, replacing any existing value for the given key.
void putByte(String key, byte value)
Inserts a byte value into the mapping of this Bundle, replacing any existing value for the given key.
void putByteArray(String key, byte[] value)
Inserts a byte array value into the mapping of this Bundle, replacing any existing value for the given key.
void putChar(String key, char value)
Inserts a char value into the mapping of this Bundle, replacing any existing value for the given key.
void putCharArray(String key, char[] value)
Inserts a char array value into the mapping of this Bundle, replacing any existing value for the given key.
void putDouble(String key, double value)
Inserts a double value into the mapping of this Bundle, replacing any existing value for the given key.
void putDoubleArray(String key, double[] value)
Inserts a double array value into the mapping of this Bundle, replacing any existing value for the given key.
void putFloat(String key, float value)
Inserts a float value into the mapping of this Bundle, replacing any existing value for the given key.
void putFloatArray(String key, float[] value)
Inserts a float array value into the mapping of this Bundle, replacing any existing value for the given key.
void putInt(String key, int value)
Inserts an int value into the mapping of this Bundle, replacing any existing value for the given key.
void putIntArray(String key, int[] value)
Inserts an int array value into the mapping of this Bundle, replacing any existing value for the given key.
void putLong(String key, long value)
Inserts a long value into the mapping of this Bundle, replacing any existing value for the given key.
void putLongArray(String key, long[] value)
Inserts a long array value into the mapping of this Bundle, replacing any existing value for the given key.
void putShort(String key, short value)
Inserts a short value into the mapping of this Bundle, replacing any existing value for the given key.
void putShortArray(String key, short[] value)
Inserts a short array value into the mapping of this Bundle, replacing any existing value for the given key.
void putString(String key, String value)
Inserts a String value into the mapping of this Bundle, replacing any existing value for the given key.
void putStringArray(String key, String[] value)
Inserts a String array value into the mapping of this Bundle, replacing any existing value for the given key.
void removeIfExist(String key)
Remove specific key if exist
int size()
Returns the number of mappings.
byte[] toByteArray()
Transform key-value data into byte array
Protected Methods
void put(String key, Serializable value)
Inserts a value into the mapping of this Bundle, replacing any existing value for the given key.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int FLAG_IS_DEFAULT_PEN

Since: API Level 2.0

Flag which is used at KEY_FLAGS

Set it to KEY_FLAGS if this pen is the default pen

Constant Value: 8 (0x00000008)

public static final int FLAG_IS_ERASER

Since: API Level 2.0

Flag which is used at KEY_FLAGS

Set it to KEY_FLAGS if this pen is an eraser

Constant Value: 1 (0x00000001)

public static final int FLAG_IS_HIGHLIGHTER

Since: API Level 4.0

Flag which is used at KEY_FLAGS

Set it to KEY_FLAGS if this pen is the default pen

Constant Value: 16 (0x00000010)

public static final int FLAG_IS_RENDER_SUPPLIER

Since: API Level 2.0

Flag which is used at KEY_FLAGS

Set it to KEY_FLAGS if this pen is also an interface of IRenderSupplier

Constant Value: 4 (0x00000004)

public static final int FLAG_IS_SKIA_SIMPLE_PEN

Since: API Level 2.0

Flag which is used at KEY_FLAGS

Set it to KEY_FLAGS if this pen is a simple pen

Constant Value: 2 (0x00000002)

public static final String KEY_APP_PACKAGENAME

Since: API Level 2.0

The application package name which is written at AndroidManifest.xml

Type: String

Require Field: true

Constant Value: "_app_packagename"

public static final String KEY_BACKGROUND_RESID

Since: API Level 2.0

The pen background image resource id

Type: int

Require Field: false

Constant Value: "_background_resid"

public static final String KEY_COLOR_ADJUSTABLE

Since: API Level 2.0

The user can change pen width or not

Type: boolean

Require Field: true

Default Value: true

Constant Value: "_color_adjustable"

public static final String KEY_COLOR_DEFAULT

Since: API Level 2.0

The default pen color

Type: int

Require Field: true

Default Value: Color.BLACK

Constant Value: "_color_default"

public static final String KEY_DISPLAY_NAME_RESID

Since: API Level 2.0

The pen display name resource id

Type: long

Require Field: true

Constant Value: "_display_name_resid"

public static final String KEY_FIXED_WIDTH_ARRAY

Since: API Level 2.0

Current pen tool box only support 5 width, if this value is set, PIM will use these width values

Type: float[]

Require Field: false

Constant Value: "_fixed_width_array"

public static final String KEY_FLAGS

Since: API Level 2.0

Some basic flags

Type: int

Require Field: true

Default Value: 0x0000

Constant Value: "_flags"

public static final String KEY_PEN_CLASSNAME

Since: API Level 2.0

The classname which inherits com.htc.painting.tool.pen.Pen

Type: String

Require Field: true

Constant Value: "_pen_classname"

public static final String KEY_PEN_DISABLE_IMAGE_RESID

Since: API Level 2.0

The pen disable image resource id

Type: int

Require Field: false

Constant Value: "_pen_disable_image_resid"

public static final String KEY_PEN_NAME

Since: API Level 2.0

The pen unique name

Type: String

Require Field: true

Constant Value: "_pen_name"

public static final String KEY_SUPPORTED_COLOR_ARRAY

Since: API Level 2.0

if this value is set, PIM will use these color values only

Type: int[]

Require Field: false

Constant Value: "_supported_color_array"

public static final String KEY_THUMBNAIL_RESID

Since: API Level 2.0

The pen thumbnail resource id

Type: int

Require Field: false

Constant Value: "_thumbnail_resid"

public static final String KEY_TRANSPARENCY_ADJUSTABLE

Since: API Level 2.0

The user can adjust pen transparency or not

Type: boolean

Require Field: true

Default Value: false

Constant Value: "_transparency_adjustable"

public static final String KEY_TRANSPARENCY_ALPHA_DEFAULT

Since: API Level 2.0

The transparency alpha value

Type: int

Require Field: true

Default Value: 0

Value: 0-255 (follow skia design)

Constant Value: "_transparency_alpha_default"

public static final String KEY_VERSION

Since: API Level 2.0

This pen version, we can use this version info to know that we shall use new pen to replace old pen or not.

Type: int

Require Field: true

Constant Value: "_version"

public static final String KEY_WIDTH_ADJUSTABLE

Since: API Level 2.0

The user can change pen width or not

Type: boolean

Require Field: true

Default Value: true

Constant Value: "_width_adjustable"

public static final String KEY_WIDTH_DEFAULT

Since: API Level 2.0

The default pen width

Type: float

Require Field: true

Default Value: 25

Constant Value: "_width_default"

public static final String KEY_WIDTH_MAX

Since: API Level 2.0

The maximum available pen width

Type: float

Require Field: true

Default Value: 20

Constant Value: "_width_max"

public static final String KEY_WIDTH_MIN

Since: API Level 2.0

The minimum available pen width

Type: float

Require Field: true

Default Value: 1

Constant Value: "_width_min"

Fields

protected Map<StringSerializable> mMap

Since: API Level 2.0

Public Constructors

public PenProps ()

Since: API Level 2.0

Default constructor

public PenProps (byte[] bProperties)

Since: API Level 2.0

Constructor with binary property map

Parameters
bProperties a byte[], or null

public PenProps (PenProps ppb)

Since: API Level 2.0

Constructor with PenProps

Public Methods

public void checkMissingKeyAndTypes ()

Since: API Level 2.0

Make sure that all key which is declared at this class has been set.

Throws
PenException

public boolean containsKey (String key)

Since: API Level 2.0

This key has been set or not

Parameters
key a String, or null
Returns
  • true if we found this key in my map

public boolean equals (Object object)

Since: API Level

Compares the specified object to this instance, and returns true if the specified object is a PenProps and both PenProps contain the same PenProps.

Parameters
object the object to compare with this object.
Returns
  • boolean true if the object is the same as this object, and false if it is different from this object.

public boolean getBoolean (String key)

Since: API Level 2.0

Returns the value associated with the given key, or false if no mapping of the desired type exists for the given key.

Parameters
key a String
Returns
  • a boolean value

public boolean getBoolean (String key, boolean defaultValue)

Since: API Level 2.0

Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.

Parameters
key a String
Returns
  • a boolean value

public boolean[] getBooleanArray (String key)

Since: API Level 2.0

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.

Parameters
key a String, or null
Returns
  • a boolean[] value, or null

public byte getByte (String key)

Since: API Level 2.0

Returns the value associated with the given key, or (byte) 0 if no mapping of the desired type exists for the given key.

Parameters
key a String
Returns
  • a byte value

public Byte getByte (String key, byte defaultValue)

Since: API Level 2.0

Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.

Parameters
key a String
Returns
  • a byte value

public byte[] getByteArray (String key)

Since: API Level 2.0

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.

Parameters
key a String, or null
Returns
  • a byte[] value, or null

public char getChar (String key)

Since: API Level 2.0

Returns the value associated with the given key, or false if no mapping of the desired type exists for the given key.

Parameters
key a String
Returns
  • a char value

public char getChar (String key, char defaultValue)

Since: API Level 2.0

Returns the value associated with the given key, or (char) 0 if no mapping of the desired type exists for the given key.

Parameters
key a String
Returns
  • a char value

public char[] getCharArray (String key)

Since: API Level 2.0

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.

Parameters
key a String, or null
Returns
  • a char[] value, or null

public double getDouble (String key)

Since: API Level 2.0

Returns the value associated with the given key, or 0.0 if no mapping of the desired type exists for the given key.

Parameters
key a String
Returns
  • a double value

public double getDouble (String key, double defaultValue)

Since: API Level 2.0

Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.

Parameters
key a String
Returns
  • a double value

public double[] getDoubleArray (String key)

Since: API Level 2.0

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.

Parameters
key a String, or null
Returns
  • a double[] value, or null

public float getFloat (String key)

Since: API Level 2.0

Returns the value associated with the given key, or 0.0f if no mapping of the desired type exists for the given key.

Parameters
key a String
Returns
  • a float value

public float getFloat (String key, float defaultValue)

Since: API Level 2.0

Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.

Parameters
key a String
Returns
  • a float value

public float[] getFloatArray (String key)

Since: API Level 2.0

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.

Parameters
key a String, or null
Returns
  • a float[] value, or null

public int getInt (String key, int defaultValue)

Since: API Level 2.0

Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.

Parameters
key a String
Returns
  • an int value

public int getInt (String key)

Since: API Level 2.0

Returns the value associated with the given key, or 0 if no mapping of the desired type exists for the given key.

Parameters
key a String
Returns
  • an int value

public int[] getIntArray (String key)

Since: API Level 2.0

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.

Parameters
key a String, or null
Returns
  • an int[] value, or null

public long getLong (String key)

Since: API Level 2.0

Returns the value associated with the given key, or 0L if no mapping of the desired type exists for the given key.

Parameters
key a String
Returns
  • a long value

public long getLong (String key, long defaultValue)

Since: API Level 2.0

Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.

Parameters
key a String
Returns
  • a long value

public long[] getLongArray (String key)

Since: API Level 2.0

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.

Parameters
key a String, or null
Returns
  • a long[] value, or null

public short getShort (String key)

Since: API Level 2.0

Returns the value associated with the given key, or (short) 0 if no mapping of the desired type exists for the given key.

Parameters
key a String
Returns
  • a short value

public short getShort (String key, short defaultValue)

Since: API Level 2.0

Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.

Parameters
key a String
Returns
  • a short value

public short[] getShortArray (String key)

Since: API Level 2.0

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.

Parameters
key a String, or null
Returns
  • a short[] value, or null

public String getString (String key)

Since: API Level 2.0

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.

Parameters
key a String, or null
Returns
  • a String value, or null

public String[] getStringArray (String key)

Since: API Level 2.0

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.

Parameters
key a String, or null
Returns
  • a String[] value, or null

public void putBoolean (String key, boolean value)

Since: API Level 2.0

Inserts a Boolean value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

Parameters
key a String, or null
value a Boolean, or null
Throws
PenException

public void putBooleanArray (String key, boolean[] value)

Since: API Level 2.0

Inserts a boolean array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

Parameters
key a String, or null
value a boolean array object, or null
Throws
PenException

public void putByte (String key, byte value)

Since: API Level 2.0

Inserts a byte value into the mapping of this Bundle, replacing any existing value for the given key.

Parameters
key a String, or null
value a byte
Throws
PenException

public void putByteArray (String key, byte[] value)

Since: API Level 2.0

Inserts a byte array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

Parameters
key a String, or null
value a byte array object, or null
Throws
PenException

public void putChar (String key, char value)

Since: API Level 2.0

Inserts a char value into the mapping of this Bundle, replacing any existing value for the given key.

Parameters
key a String, or null
value a char, or null
Throws
PenException

public void putCharArray (String key, char[] value)

Since: API Level 2.0

Inserts a char array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

Parameters
key a String, or null
value a char array object, or null
Throws
PenException

public void putDouble (String key, double value)

Since: API Level 2.0

Inserts a double value into the mapping of this Bundle, replacing any existing value for the given key.

Parameters
key a String, or null
value a double
Throws
PenException

public void putDoubleArray (String key, double[] value)

Since: API Level 2.0

Inserts a double array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

Parameters
key a String, or null
value a double array object, or null
Throws
PenException

public void putFloat (String key, float value)

Since: API Level 2.0

Inserts a float value into the mapping of this Bundle, replacing any existing value for the given key.

Parameters
key a String, or null
value a float
Throws
PenException

public void putFloatArray (String key, float[] value)

Since: API Level 2.0

Inserts a float array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

Parameters
key a String, or null
value a float array object, or null
Throws
PenException

public void putInt (String key, int value)

Since: API Level 2.0

Inserts an int value into the mapping of this Bundle, replacing any existing value for the given key.

Parameters
key a String, or null
value an int, or null
Throws
PenException

public void putIntArray (String key, int[] value)

Since: API Level 2.0

Inserts an int array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

Parameters
key a String, or null
value an int array object, or null
Throws
PenException

public void putLong (String key, long value)

Since: API Level 2.0

Inserts a long value into the mapping of this Bundle, replacing any existing value for the given key.

Parameters
key a String, or null
value a long
Throws
PenException

public void putLongArray (String key, long[] value)

Since: API Level 2.0

Inserts a long array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

Parameters
key a String, or null
value a long array object, or null
Throws
PenException

public void putShort (String key, short value)

Since: API Level 2.0

Inserts a short value into the mapping of this Bundle, replacing any existing value for the given key.

Parameters
key a String, or null
value a short
Throws
PenException

public void putShortArray (String key, short[] value)

Since: API Level 2.0

Inserts a short array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

Parameters
key a String, or null
value a short array object, or null
Throws
PenException

public void putString (String key, String value)

Since: API Level 2.0

Inserts a String value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

Parameters
key a String, or null
value a String, or null
Throws
PenException

public void putStringArray (String key, String[] value)

Since: API Level 2.0

Inserts a String array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

Parameters
key a String, or null
value a String array object, or null
Throws
PenException

public void removeIfExist (String key)

Since: API Level 2.0

Remove specific key if exist

Parameters
key a String, or null

public int size ()

Since: API Level 2.0

Returns the number of mappings.

Returns
  • the number of mappings.

public byte[] toByteArray ()

Since: API Level 2.0

Transform key-value data into byte array

Returns
  • binary property map

Protected Methods

protected void put (String key, Serializable value)

Since: API Level 2.0

Inserts a value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.

Parameters
key a String, or null
Throws
PenException