Example usage for java.io ObjectInput readChar

List of usage examples for java.io ObjectInput readChar

Introduction

In this page you can find the example usage for java.io ObjectInput readChar.

Prototype

char readChar() throws IOException;

Source Link

Document

Reads two input bytes and returns a char value.

Usage

From source file:gnu.trove.map.custom_hash.TObjectCharCustomHashMap.java

public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {

    // VERSION//from w w w  . java  2 s  .c o m
    in.readByte();

    // SUPER
    super.readExternal(in);

    // STRATEGY
    strategy = (HashingStrategy<K>) in.readObject();

    // NO_ENTRY_VALUE
    no_entry_value = in.readChar();

    // NUMBER OF ENTRIES
    int size = in.readInt();
    setUp(size);

    // ENTRIES
    while (size-- > 0) {
        //noinspection unchecked
        K key = (K) in.readObject();
        char val = in.readChar();
        put(key, val);
    }
}