Example usage for org.apache.hadoop.io WritableUtils readCompressedString

List of usage examples for org.apache.hadoop.io WritableUtils readCompressedString

Introduction

In this page you can find the example usage for org.apache.hadoop.io WritableUtils readCompressedString.

Prototype

public static String readCompressedString(DataInput in) throws IOException 

Source Link

Usage

From source file:com.iflytek.spider.parse.ParseText.java

License:Apache License

public void readFields(DataInput in) throws IOException {
    byte version = in.readByte();
    switch (version) {
    case 1://from  ww  w  .  j a  va  2  s. c om
        text = WritableUtils.readCompressedString(in);
        break;
    case VERSION:
        text = Text.readString(in);
        break;
    default:
        throw new VersionMismatchException(VERSION, version);
    }
}