Bundle putByteArray - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Bundle putByteArray method.

This code example shows how to use the following methods:getByteArray, putByteArray
  } 
 
  @Test 
  public void testByteArray() { 
    byte [] arr = new byte[] { 12, 24 };
    bundle.putByteArray("foo", arr);
 
    Assert.assertArrayEquals(arr, bundle.getByteArray("foo"));
    assertNull(bundle.getByteArray("bar"));
  } 
 
  @Test 
  public void testCharArray() { 
    char [] arr = new char[] { 'c', 'j' };
    bundle.putCharArray("foo", arr);
 
    Assert.assertArrayEquals(arr, bundle.getCharArray("foo"));
    assertNull(bundle.getCharArray("bar"));
  } 
 
8
CodeRank
This code example shows how to use the following methods:getByteArray, putByteArray
    } 
 
    @Test 
    public void testByteArray() { 
        byte [] arr = new byte[] { 12, 24 };
        bundle.putByteArray("foo", arr);
 
        Assert.assertArrayEquals(arr, bundle.getByteArray("foo"));
        assertNull(bundle.getByteArray("bar"));
    } 
 
    @Test 
    public void testCharArray() { 
        char [] arr = new char[] { 'c', 'j' };
        bundle.putCharArray("foo", arr);
 
        Assert.assertArrayEquals(arr, bundle.getCharArray("foo"));
        assertNull(bundle.getCharArray("bar"));
    } 
 
8
CodeRank
This code example shows how to use the following methods:putByteArray
    return extras.getCharSequence(name);
  } 
 
  @Implementation 
  public void putExtra(String key, byte[] value) {
    extras.putByteArray(key, value);
  } 
 
  @Implementation 
  public Intent putStringArrayListExtra(String key, ArrayList<String> value) {
    extras.putStringArrayList(key, value);
    return realIntent;
  } 
 
  @Implementation 
  public ArrayList<String> getStringArrayListExtra(String name) {
    return extras.getStringArrayList(name);
  } 
 
  @Implementation 
6
CodeRank
This code example shows how to use the following methods:putByteArray
        return extras.getCharSequence(name);
    } 
 
    @Implementation 
    public void putExtra(String key, byte[] value) {
        extras.putByteArray(key, value);
    } 
 
    @Implementation 
    public Intent putStringArrayListExtra(String key, ArrayList<String> value) {
        extras.putStringArrayList(key, value);
        return realIntent;
    } 
 
    @Implementation 
    public ArrayList<String> getStringArrayListExtra(String name) {
        return extras.getStringArrayList(name);
    } 
 
    @Implementation 
6
CodeRank
This code example shows how to use the following methods:putByteArray
   * 
   * @param key a String, or null 
   * @param value a byte array object, or null 
   */ 
  public TaskResult add(String key, byte[] value) {
    mBundle.putByteArray(key, value);
    return this;
  } 
 
  /** 
   * 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. 
   * 
   * @param key a String, or null 
   * @param value a short array object, or null 
   */ 
  public TaskResult add(String key, short[] value) {
    mBundle.putShortArray(key, value);
    return this;
  } 
5
CodeRank
This code example shows how to use the following methods:putBoolean, putByteArray, putInt, putLong, putString
4
CodeRank

Related Bundle putByteArray Questions & Answers:

putByteArray Method Overview
Inserts a byte array value into the mapping of this Bundle, replacing any existing value for the given key.
See Code Examples for other Android Bundle Methods: