read String from Parcel - Android android.os

Android examples for android.os:Parcel

Description

read String from Parcel

Demo Code


//package com.java2s;
import android.os.Parcel;

public class Main {
    public static String readString(Parcel in) {
        if (in == null)
            return null;
        if (in.readByte() == 1)
            return in.readString();
        return null;
    }//from w w w .j av  a  2 s.  c  o m
}

Related Tutorials