Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
/** 
 ** Copyright (C) SAS Institute, All rights reserved.
 ** General Public License: http://www.opensource.org/licenses/gpl-license.php
 **/

import android.os.Bundle;

import android.os.Parcelable;

public class Main {
    /** key used to extract serialized Properties object from Bundle. */
    public static final String BUNDLE_PROPERTIES = "properties";

    /**
     * Create a Parcelable Bundle containing a char[] for transport to the test package engine.
     * The char[] message is stored via Bundle.putCharArray using {@link #BUNDLE_PROPERTIES} as the key for the item. 
     * The original intent here is to store Java Properties in the Bundle that were serialized via 
     * the Java Properties.store method.<br>
     * NOTE: This has not yet been tested!
     * @param char[] (Properties) to send across processes.
     * @return Parcelable Bundle
     * @see Bundle#putCharArray(String, char[])
     * @see Bundle#getCharArray(String)
     */
    public static Parcelable setParcelableProps(char[] bytes) {
        Bundle bundle = new Bundle();
        bundle.putCharArray(BUNDLE_PROPERTIES, bytes);
        bundle.setClassLoader(Bundle.class.getClassLoader());
        return bundle;
    }
}