java.lang.Byte Java Examples

The following examples show how to use java.lang.Byte. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AutoValue_TestClassBundled.java    From auto-value-bundle with MIT License 5 votes vote down vote up
public static byte[] toPrimitive(Byte[] byteParam) {
    byte[] bytes = new byte[byteParam.length];
    for (int i = 0; i < byteParam.length; i++) {
        bytes[i] = byteParam[i];
    }
    return bytes;
}
 
Example #2
Source File: AutoValue_TestClassBundledGCM.java    From auto-value-bundle with MIT License 5 votes vote down vote up
public static TestClassBundledGCM unbundle(Bundle bundle, Gson gson) {
    return new AutoValue_TestClassBundledGCM(
            bundle,
            Byte.parseByte(bundle.getString("some_byte")),
            Boolean.parseBoolean(bundle.getString("some_boolean")),
            Short.parseShort(bundle.getString("some_short")),
            Integer.parseInt(bundle.getString("some_int")),
            Long.parseLong(bundle.getString("some_long")),
            bundle.getString("some_char").charAt(0),
            Float.parseFloat(bundle.getString("some_float")),
            Double.parseDouble(bundle.getString("some_double")),
            bundle.getString("some_string"),
            bundle.getString("some_char_sequence"),
            gson.fromJson(bundle.getString("some_parcelable"), Parcelable.class),
            gson.fromJson(bundle.getString("some_parcelable_array_list"), new com.google.common.reflect.TypeToken<java.util.ArrayList<Parcelable>>(){}.getType()),
            gson.fromJson(bundle.getString("some_parcelable_sparse_array"), new com.google.common.reflect.TypeToken<android.util.SparseArray<Parcelable>>(){}.getType()),
            gson.fromJson(bundle.getString("some_serializable"), Serializable.class),
            gson.fromJson(bundle.getString("some_integer_array_list"), new com.google.common.reflect.TypeToken<java.util.ArrayList<Integer>>(){}.getType()),
            gson.fromJson(bundle.getString("some_string_array_list"), new com.google.common.reflect.TypeToken<java.util.ArrayList<String>>(){}.getType()),
            gson.fromJson(bundle.getString("some_char_sequence_array_list"), new com.google.common.reflect.TypeToken<java.util.ArrayList<CharSequence>>(){}.getType()),
            toPrimitive(gson.fromJson(bundle.getString("some_byte_array"), Byte[].class)),
            toPrimitive(gson.fromJson(bundle.getString("some_short_array"), Short[].class)),
            toPrimitive(gson.fromJson(bundle.getString("some_char_array"), Character[].class)),
            toPrimitive(gson.fromJson(bundle.getString("some_float_array"), Float[].class)),
            gson.fromJson(bundle.getString("some_unknown_object"), new com.google.common.reflect.TypeToken<UnknownObject>(){}.getType()),
            gson.fromJson(bundle.getString("some_unknown_object_list"), new com.google.common.reflect.TypeToken<ArrayList<UnknownObject>>(){}.getType()),
            gson.fromJson(bundle.getString("test_enum"), new com.google.common.reflect.TypeToken<TestEnum>(){}.getType()));
}
 
Example #3
Source File: AutoValue_TestClassBundledGCM.java    From auto-value-bundle with MIT License 5 votes vote down vote up
public static byte[] toPrimitive(Byte[] byteParam) {
    byte[] bytes = new byte[byteParam.length];
    for (int i = 0; i < byteParam.length; i++) {
        bytes[i] = byteParam[i];
    }
    return bytes;
}
 
Example #4
Source File: DataBindingModelWithAllFieldTypesNoValidation_.java    From epoxy with Apache License 2.0 4 votes vote down vote up
public Byte valueByteWrapper() {
  return valueByteWrapper;
}
 
Example #5
Source File: ModelWithAllFieldTypes_.java    From epoxy with Apache License 2.0 4 votes vote down vote up
public Byte valueByteWrapper() {
  return valueByteWrapper;
}
 
Example #6
Source File: DataBindingModelWithAllFieldTypes_.java    From epoxy with Apache License 2.0 4 votes vote down vote up
public Byte valueByteWrapper() {
  return valueByteWrapper;
}
 
Example #7
Source File: ModelWithAllPrivateFieldTypes_.java    From epoxy with Apache License 2.0 4 votes vote down vote up
public Byte valueByteWrapper() {
  return super.getValueByteWrapper();
}