Example usage for org.apache.hadoop.fs FSExceptionMessages CANNOT_SEEK_PAST_EOF

List of usage examples for org.apache.hadoop.fs FSExceptionMessages CANNOT_SEEK_PAST_EOF

Introduction

In this page you can find the example usage for org.apache.hadoop.fs FSExceptionMessages CANNOT_SEEK_PAST_EOF.

Prototype

String CANNOT_SEEK_PAST_EOF

To view the source code for org.apache.hadoop.fs FSExceptionMessages CANNOT_SEEK_PAST_EOF.

Click Source Link

Document

Seeks :

Usage

From source file:com.aliyun.odps.volume.VolumeFSInputStream.java

License:Apache License

@Override
public synchronized void seek(long pos) throws IOException {
    checkClosed();//from   w  w  w  .j a  va  2 s.  c o  m
    if (pos < 0) {
        throw new EOFException(FSExceptionMessages.NEGATIVE_SEEK);
    }
    if (pos > fileLength) {
        throw new EOFException(FSExceptionMessages.CANNOT_SEEK_PAST_EOF);
    }
    this.pos = pos;
    this.isSeeked = true;
}