Java Code Examples for org.apache.ignite.binary.BinaryReader#readByteArray()

The following examples show how to use org.apache.ignite.binary.BinaryReader#readByteArray() . 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: IgniteNodeInfo.java    From vertx-ignite with Apache License 2.0 5 votes vote down vote up
@Override
public void readBinary(BinaryReader reader) throws BinaryObjectException {
  String host = reader.readString("host");
  int port = reader.readInt("port");
  byte[] bytes = reader.readByteArray("meta");
  nodeInfo = new NodeInfo(host, port, bytes != null ? new JsonObject(Buffer.buffer(bytes)) : null);
}
 
Example 2
Source File: BinaryMarshallerSelfTest.java    From ignite with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
@Override public void readBinary(BinaryReader reader) throws BinaryObjectException {
    b = reader.readByte("_b");
    s = reader.readShort("_s");
    i = reader.readInt("_i");
    l = reader.readLong("_l");
    f = reader.readFloat("_f");
    d = reader.readDouble("_d");
    c = reader.readChar("_c");
    bool = reader.readBoolean("_bool");
    str = reader.readString("_str");
    uuid = reader.readUuid("_uuid");
    date = reader.readDate("_date");
    ts = reader.readTimestamp("_ts");
    time = reader.readTime("_time");
    bArr = reader.readByteArray("_bArr");
    sArr = reader.readShortArray("_sArr");
    iArr = reader.readIntArray("_iArr");
    lArr = reader.readLongArray("_lArr");
    fArr = reader.readFloatArray("_fArr");
    dArr = reader.readDoubleArray("_dArr");
    cArr = reader.readCharArray("_cArr");
    boolArr = reader.readBooleanArray("_boolArr");
    strArr = reader.readStringArray("_strArr");
    uuidArr = reader.readUuidArray("_uuidArr");
    dateArr = reader.readDateArray("_dateArr");
    timeArr = reader.readTimeArray("_timeArr");
    objArr = reader.readObjectArray("_objArr");
    col = reader.readCollection("_col");
    map = reader.readMap("_map");
    enumVal = reader.readEnum("_enumVal");
    enumArr = reader.readEnumArray("_enumArr");
    simple = reader.readObject("_simple");
    binary = reader.readObject("_binary");

    BinaryRawReader raw = reader.rawReader();

    bRaw = raw.readByte();
    sRaw = raw.readShort();
    iRaw = raw.readInt();
    lRaw = raw.readLong();
    fRaw = raw.readFloat();
    dRaw = raw.readDouble();
    cRaw = raw.readChar();
    boolRaw = raw.readBoolean();
    strRaw = raw.readString();
    uuidRaw = raw.readUuid();
    dateRaw = raw.readDate();
    tsRaw = raw.readTimestamp();
    timeRaw = raw.readTime();
    bArrRaw = raw.readByteArray();
    sArrRaw = raw.readShortArray();
    iArrRaw = raw.readIntArray();
    lArrRaw = raw.readLongArray();
    fArrRaw = raw.readFloatArray();
    dArrRaw = raw.readDoubleArray();
    cArrRaw = raw.readCharArray();
    boolArrRaw = raw.readBooleanArray();
    strArrRaw = raw.readStringArray();
    uuidArrRaw = raw.readUuidArray();
    dateArrRaw = raw.readDateArray();
    timeArrRaw = raw.readTimeArray();
    objArrRaw = raw.readObjectArray();
    colRaw = raw.readCollection();
    mapRaw = raw.readMap();
    enumValRaw = raw.readEnum();
    enumArrRaw = raw.readEnumArray();
    simpleRaw = raw.readObject();
    binaryRaw = raw.readObject();
}