本文整理了Java中android.os.Parcel.readByte()
方法的一些代码示例,展示了Parcel.readByte()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Parcel.readByte()
方法的具体详情如下:
包路径:android.os.Parcel
类名称:Parcel
方法名:readByte
[英]Read a byte value from the parcel at the current dataPosition().
[中]
代码示例来源:origin: android-hacker/VirtualXposed
protected PackageUserState(Parcel in) {
this.launched = in.readByte() != 0;
this.hidden = in.readByte() != 0;
this.installed = in.readByte() != 0;
}
代码示例来源:origin: johncarl81/parceler
@Override
public Byte nullSafeFromParcel(Parcel parcel) {
return parcel.readByte();
}
代码示例来源:origin: lingochamp/FileDownloader
CompletedSnapshot(Parcel in) {
super(in);
this.reusedDownloadedFile = in.readByte() != 0;
this.totalBytes = in.readLong();
}
代码示例来源:origin: lingochamp/FileDownloader
CompletedSnapshot(Parcel in) {
super(in);
this.reusedDownloadedFile = in.readByte() != 0;
this.totalBytes = in.readInt();
}
代码示例来源:origin: android-hacker/VirtualXposed
protected InstallResult(Parcel in) {
this.isSuccess = in.readByte() != 0;
this.isUpdate = in.readByte() != 0;
this.packageName = in.readString();
this.error = in.readString();
}
代码示例来源:origin: rey5137/material
/**
* Constructor called from {@link #CREATOR}
*/
SavedState(Parcel in) {
super(in);
position = in.readInt();
showDropdown = in.readByte() != 0;
}
代码示例来源:origin: lingochamp/FileDownloader
ConnectedMessageSnapshot(Parcel in) {
super(in);
this.resuming = in.readByte() != 0;
this.totalBytes = in.readInt();
this.etag = in.readString();
this.fileName = in.readString();
}
代码示例来源:origin: vondear/RxTool
@SuppressWarnings("WrongConstant")
public SavedState(Parcel source, ClassLoader loader) {
super(source);
facing = source.readInt();
ratio = source.readParcelable(loader);
autoFocus = source.readByte() != 0;
flash = source.readInt();
}
代码示例来源:origin: lingochamp/FileDownloader
ConnectedMessageSnapshot(Parcel in) {
super(in);
this.resuming = in.readByte() != 0;
this.totalBytes = in.readLong();
this.etag = in.readString();
this.fileName = in.readString();
}
代码示例来源:origin: android-hacker/VirtualXposed
protected InstalledAppInfo(Parcel in) {
this.packageName = in.readString();
this.apkPath = in.readString();
this.libPath = in.readString();
this.dependSystem = in.readByte() != 0;
this.appId = in.readInt();
}
代码示例来源:origin: lingochamp/FileDownloader
protected FileDownloadModel(Parcel in) {
this.id = in.readInt();
this.url = in.readString();
this.path = in.readString();
this.pathAsDirectory = in.readByte() != 0;
this.filename = in.readString();
this.status = new AtomicInteger(in.readByte());
this.soFar = new AtomicLong(in.readLong());
this.total = in.readLong();
this.errMsg = in.readString();
this.eTag = in.readString();
this.connectionCount = in.readInt();
this.isLargeFile = in.readByte() != 0;
}
代码示例来源:origin: google/ExoPlayer
/* package */ ChapterTocFrame(Parcel in) {
super(ID);
this.elementId = castNonNull(in.readString());
this.isRoot = in.readByte() != 0;
this.isOrdered = in.readByte() != 0;
this.children = in.createStringArray();
int subFrameCount = in.readInt();
subFrames = new Id3Frame[subFrameCount];
for (int i = 0; i < subFrameCount; i++) {
subFrames[i] = in.readParcelable(Id3Frame.class.getClassLoader());
}
}
代码示例来源:origin: google/ExoPlayer
/* package */ SchemeData(Parcel in) {
uuid = new UUID(in.readLong(), in.readLong());
licenseServerUrl = in.readString();
mimeType = in.readString();
data = in.createByteArray();
requiresSecureDecryption = in.readByte() != 0;
}
代码示例来源:origin: google/ExoPlayer
/* package */ SelectionOverride(Parcel in) {
groupIndex = in.readInt();
length = in.readByte();
tracks = new int[length];
in.readIntArray(tracks);
}
代码示例来源:origin: facebook/facebook-android-sdk
ShareMessengerURLActionButton(final Parcel in) {
super(in);
this.url = in.readParcelable(Uri.class.getClassLoader());
this.isMessengerExtensionURL = (in.readByte() != 0);
this.fallbackUrl = in.readParcelable(Uri.class.getClassLoader());
this.webviewHeightRatio = (WebviewHeightRatio) in.readSerializable();
this.shouldHideWebviewShareButton = (in.readByte() != 0);
}
代码示例来源:origin: android-hacker/VirtualXposed
protected PackageSetting(Parcel in) {
this.packageName = in.readString();
this.apkPath = in.readString();
this.libPath = in.readString();
this.dependSystem = in.readByte() != 0;
this.appId = in.readInt();
//noinspection unchecked
this.userState = in.readSparseArray(PackageUserState.class.getClassLoader());
this.skipDexOpt = in.readByte() != 0;
}
代码示例来源:origin: android-hacker/VirtualXposed
protected IntentInfo(Parcel in) {
this.filter = in.readParcelable(VPackage.class.getClassLoader());
this.hasDefault = in.readByte() != 0;
this.labelRes = in.readInt();
this.nonLocalizedLabel = in.readString();
this.icon = in.readInt();
this.logo = in.readInt();
this.banner = in.readInt();
}
代码示例来源:origin: pockethub/PocketHub
protected IssueFilter(Parcel in) {
repository = in.readParcelable(Repository.class.getClassLoader());
labels = new ArrayList<>();
in.readList(labels, Label.class.getClassLoader());
milestone = in.readParcelable(Milestone.class.getClassLoader());
assignee = in.readParcelable(User.class.getClassLoader());
open = in.readByte() != 0;
direction = in.readString();
sortType = in.readString();
}
代码示例来源:origin: robolectric/robolectric
@Test
public void testReadWriteMultipleBytes() {
for (byte i = Byte.MIN_VALUE; i < Byte.MAX_VALUE; ++i) {
parcel.writeByte(i);
}
parcel.setDataPosition(0);
for (byte i = Byte.MIN_VALUE; i < Byte.MAX_VALUE; ++i) {
assertThat(parcel.readByte()).isEqualTo(i);
}
// now try to read past the number of items written and see what happens
assertThat(parcel.readByte()).isEqualTo((byte) 0);
}
代码示例来源:origin: robolectric/robolectric
@Test
public void testReadWriteSingleByte() {
byte val = 1;
parcel.writeByte(val);
parcel.setDataPosition(0);
assertThat(parcel.readByte()).isEqualTo(val);
}
内容来源于网络,如有侵权,请联系作者删除!