当前位置: 首页>>代码示例>>Java>>正文


Java Parcel.readByteArray方法代码示例

本文整理汇总了Java中android.os.Parcel.readByteArray方法的典型用法代码示例。如果您正苦于以下问题:Java Parcel.readByteArray方法的具体用法?Java Parcel.readByteArray怎么用?Java Parcel.readByteArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.os.Parcel的用法示例。


在下文中一共展示了Parcel.readByteArray方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: readFromParcel

import android.os.Parcel; //导入方法依赖的package包/类
public void readFromParcel(Parcel in){

        String tit = in.readString();
        if (tit == null || tit.isEmpty()) {
            throw new IllegalArgumentException("El titulo no puede ser nulo ni vacio"); //$NON-NLS-1$
        }
        this.title = tit;

        this.promoter = in.readString();
        this.banner = new byte[in.readInt()];
        in.readByteArray(this.banner);

        this.initDate = (Date) in.readSerializable();
        this.endDate = (Date) in.readSerializable();

        this.numRequiredSignatures = in.readInt();
        this.id = in.readInt();
        try {
            this.promoterUrl = new URL(in.readString());
        } catch (MalformedURLException e) {
            e.printStackTrace();
        }
        this.numActualSignatures = in.readInt();
        this.howtoSolveAsHtml = in.readString();

    }
 
开发者ID:MiFirma,项目名称:mi-firma-android,代码行数:27,代码来源:Initiative.java

示例2: createFromParcel

import android.os.Parcel; //导入方法依赖的package包/类
public MeshElementInfo createFromParcel(Parcel in) {
	MeshElementInfo eltInfo = new MeshElementInfo();
	int n;
	byte[] tmp;

	n = in.readInt();
	tmp = new byte[n];
	in.readByteArray(tmp);
	eltInfo.mMids = byteArrayToShortArray(tmp);

	n = in.readInt();
	eltInfo.mVmids = new int[n];
	in.readIntArray(eltInfo.mVmids);

	return eltInfo;
}
 
开发者ID:blxble,项目名称:mesh-core-on-android,代码行数:17,代码来源:MeshElementInfo.java

示例3: readFromParcel

import android.os.Parcel; //导入方法依赖的package包/类
@Override
protected void readFromParcel(Parcel parcel) {
	super.readFromParcel(parcel);
	this.fileName = parcel.readString();
	
	int len = parcel.readInt();
	this.dexFile = new byte[len];
	parcel.readByteArray(this.dexFile);
}
 
开发者ID:srasthofer,项目名称:FuzzDroid,代码行数:10,代码来源:DexFileTransferTraceItem.java

示例4: IdentityKeyParcelable

import android.os.Parcel; //导入方法依赖的package包/类
public IdentityKeyParcelable(Parcel in) throws InvalidKeyException {
  int    serializedLength = in.readInt();
  byte[] serialized       = new byte[serializedLength];

  in.readByteArray(serialized);
  this.identityKey = new IdentityKey(serialized, 0);
}
 
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:8,代码来源:IdentityKeyParcelable.java

示例5: MasterSecret

import android.os.Parcel; //导入方法依赖的package包/类
private MasterSecret(Parcel in) {
  byte[] encryptionKeyBytes = new byte[in.readInt()];
  in.readByteArray(encryptionKeyBytes);

  byte[] macKeyBytes = new byte[in.readInt()];
  in.readByteArray(macKeyBytes);

  this.encryptionKey = new SecretKeySpec(encryptionKeyBytes, "AES");
  this.macKey        = new SecretKeySpec(macKeyBytes, "HmacSHA1");

  // SecretKeySpec does an internal copy in its constructor.
  Arrays.fill(encryptionKeyBytes, (byte) 0x00);
  Arrays.fill(macKeyBytes, (byte)0x00);
}
 
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:15,代码来源:MasterSecret.java

示例6: User

import android.os.Parcel; //导入方法依赖的package包/类
private User(Parcel parcel) {
    this.id = parcel.readLong();
    this.username = parcel.readString();
    this.password = parcel.readString();
    this.salt = new byte[parcel.readInt()];
    parcel.readByteArray(this.salt);
    this.cryptoKey = new byte[parcel.readInt()];
    parcel.readByteArray(this.cryptoKey);
    this.cryptoKey_iv = new byte[parcel.readInt()];
    parcel.readByteArray(this.cryptoKey_iv);
    this.createdAt = new Date(parcel.readLong());
    this.passwordNotHashed = parcel.readString();
}
 
开发者ID:ProjektMedInf,项目名称:WiFiSDCryptoLocker,代码行数:14,代码来源:User.java

示例7: createFromParcel

import android.os.Parcel; //导入方法依赖的package包/类
@Override
public ByteArrayDataPacket createFromParcel(Parcel in) {
    Map<String, String> attributes = new HashMap<>();
    int numAttributes = in.readInt();
    for (int i = 0; i < numAttributes; i++) {
        attributes.put(in.readString(), in.readString());
    }
    byte[] data = new byte[in.readInt()];
    if (data.length > 0) {
        in.readByteArray(data);
    }
    return new ByteArrayDataPacket(attributes, data);
}
 
开发者ID:hortonworks,项目名称:nifi-android-s2s,代码行数:14,代码来源:ByteArrayDataPacket.java

示例8: createFromParcel

import android.os.Parcel; //导入方法依赖的package包/类
public MeshDeviceInfo createFromParcel(Parcel in) {
	MeshDeviceInfo devInfo = new MeshDeviceInfo();
	byte[] tmp = new byte[2];

	in.readByteArray(tmp);
	devInfo.mCid = (short)(((short)tmp[0]) | (((short)tmp[1]) << 8));
	
	in.readByteArray(tmp);
	devInfo.mVid = (short)(((short)tmp[0]) | (((short)tmp[1]) << 8));

	in.readByteArray(tmp);
	devInfo.mPid = (short)(((short)tmp[0]) | (((short)tmp[1]) << 8));

	return devInfo;
}
 
开发者ID:blxble,项目名称:mesh-core-on-android,代码行数:16,代码来源:MeshDeviceInfo.java

示例9: readFromParcel

import android.os.Parcel; //导入方法依赖的package包/类
private void readFromParcel(Parcel in)
{
	timeStamp = in.readLong();
	frameSize = in.readInt();
	frameBytesData = new byte[frameSize];
	in.readByteArray(frameBytesData);
	cachePath = in.readString();
}
 
开发者ID:feigxj,项目名称:VideoRecorder-master,代码行数:9,代码来源:SavedFrames.java

示例10: createFromParcel

import android.os.Parcel; //导入方法依赖的package包/类
@Override
public Credential createFromParcel(Parcel source) {
    int encodedLength = source.readInt();
    byte[] encodedBytes = new byte[encodedLength];
    source.readByteArray(encodedBytes);

    try {
        return Credential.fromProtoBytes(encodedBytes);
    } catch (MalformedDataException ex) {
        throw new IllegalStateException("Unable to decode credential proto", ex);
    }
}
 
开发者ID:openid,项目名称:OpenYOLO-Android,代码行数:13,代码来源:Credential.java

示例11: createFromParcel

import android.os.Parcel; //导入方法依赖的package包/类
@Override
public Hint createFromParcel(Parcel source) {
    int length = source.readInt();
    byte[] hintBytes = new byte[length];
    source.readByteArray(hintBytes);
    try {
        return Hint.fromProtobufBytes(hintBytes);
    } catch (MalformedDataException ex) {
        throw new IllegalArgumentException("Unable to parse hint from parcel", ex);
    }
}
 
开发者ID:openid,项目名称:OpenYOLO-Android,代码行数:12,代码来源:Hint.java

示例12: getInetAddressFrom

import android.os.Parcel; //导入方法依赖的package包/类
private InetAddress getInetAddressFrom(Parcel in) {
    byte[] addr = new byte[in.readInt()];
    in.readByteArray(addr);
    try {
        return InetAddress.getByAddress(addr);
    } catch (UnknownHostException e) {
        e.printStackTrace();
        return null;
    }
}
 
开发者ID:adroitandroid,项目名称:Near,代码行数:11,代码来源:Host.java

示例13: createFromParcel

import android.os.Parcel; //导入方法依赖的package包/类
@Override
public PasswordSpecification createFromParcel(Parcel parcel) {
    int encodedSize = parcel.readInt();
    byte[] encoded = new byte[encodedSize];
    parcel.readByteArray(encoded);

    Protobufs.PasswordSpecification proto;
    try {
        proto = Protobufs.PasswordSpecification.parseFrom(encoded);
        return PasswordSpecification.fromProtobuf(proto);
    } catch (IOException | MalformedDataException ex) {
        throw new IllegalStateException("Unable to read proto from parcel", ex);
    }

}
 
开发者ID:openid,项目名称:OpenYOLO-Android,代码行数:16,代码来源:PasswordSpecification.java

示例14: createFromParcel

import android.os.Parcel; //导入方法依赖的package包/类
@Override
public QueryResponse createFromParcel(Parcel source) {
    String responderPackage = source.readString();
    long responseId = source.readLong();
    byte[] responseMessage = null;
    if (source.readInt() != 0) {
        int responseMessageSize = source.readInt();
        responseMessage = new byte[responseMessageSize];
        source.readByteArray(responseMessage);
    }
    return new QueryResponse(responderPackage, responseId, responseMessage);
}
 
开发者ID:openid,项目名称:OpenYOLO-Android,代码行数:13,代码来源:QueryResponse.java

示例15: Output

import android.os.Parcel; //导入方法依赖的package包/类
private Output(final Parcel in) {
    amount = (Coin) in.readSerializable();

    final int programLength = in.readInt();
    final byte[] program = new byte[programLength];
    in.readByteArray(program);
    script = new Script(program);
}
 
开发者ID:guodroid,项目名称:okwallet,代码行数:9,代码来源:PaymentIntent.java


注:本文中的android.os.Parcel.readByteArray方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。