Example usage for java.io ObjectInput read

List of usage examples for java.io ObjectInput read

Introduction

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

Prototype

public int read() throws IOException;

Source Link

Document

Reads a byte of data.

Usage

From source file:com.openlapi.AddressInfo.java

public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    int attributeCount = in.read();

    if (attributeCount > 0) {

        String[] attributes = StringUtils.split(in.readUTF(), ",");

        for (int i = 0; i < attributeCount; i++) {
            int attribute = Integer.valueOf(attributes[i]);
            setField(attribute + 1, in.readUTF());
        }//from   w w w  .jav  a 2 s.c  o m
    }
}