Package com.google.code.or.io

Examples of com.google.code.or.io.ExceedLimitException


 
  @Override
  public long skip(final long n) throws IOException {
    if(this.readLimit > 0 && (this.readCount + n) > this.readLimit) {
      this.readCount += doSkip(this.readLimit - this.readCount);
      throw new ExceedLimitException();
    } else {
      this.readCount += doSkip(n);
      return n; // always skip the number of bytes specified by parameter "n"
    }
  }
View Full Code Here


  }
 
  @Override
  public int read() throws IOException {
    if(this.readLimit > 0 && (this.readCount + 1) > this.readLimit) {
      throw new ExceedLimitException();
    } else {
      if(this.head >= this.tail) doFill();
      final int r = this.buffer[this.head++] & 0xFF;
      ++this.readCount;
      return r;
View Full Code Here

 
  @Override
  public int read(final byte b[], final int off, final int len) throws IOException {
    if(this.readLimit > 0 && (this.readCount + len) > this.readLimit) {
      this.readCount += doRead(b, off, this.readLimit - this.readCount);
      throw new ExceedLimitException();
    } else {
      this.readCount += doRead(b, off, len);
      return len; // always read the number of bytes specified by parameter "len"
    }
  }
View Full Code Here

 
  @Override
  public long skip(final long n) throws IOException {
    if(this.readLimit > 0 && (this.readCount + n) > this.readLimit) {
      this.readCount += doSkip(this.readLimit - this.readCount);
      throw new ExceedLimitException();
    } else {
      this.readCount += doSkip(n);
      return n; // always skip the number of bytes specified by parameter "n"
    }
  }
View Full Code Here

  }
 
  @Override
  public int read() throws IOException {
    if(this.readLimit > 0 && (this.readCount + 1) > this.readLimit) {
      throw new ExceedLimitException();
    } else {
      if(this.head >= this.tail) doFill();
      final int r = this.buffer[this.head++] & 0xFF;
      ++this.readCount;
      return r;
View Full Code Here

 
  @Override
  public int read(final byte b[], final int off, final int len) throws IOException {
    if(this.readLimit > 0 && (this.readCount + len) > this.readLimit) {
      this.readCount += doRead(b, off, this.readLimit - this.readCount);
      throw new ExceedLimitException();
    } else {
      this.readCount += doRead(b, off, len);
      return len; // always read the number of bytes specified by parameter "len"
    }
  }
View Full Code Here

 
  @Override
  public long skip(final long n) throws IOException {
    if(this.readLimit > 0 && (this.readCount + n) > this.readLimit) {
      this.readCount += doSkip(this.readLimit - this.readCount);
      throw new ExceedLimitException();
    } else {
      this.readCount += doSkip(n);
      return n; // always skip the number of bytes specified by parameter "n"
    }
  }
View Full Code Here

  }
 
  @Override
  public int read() throws IOException {
    if(this.readLimit > 0 && (this.readCount + 1) > this.readLimit) {
      throw new ExceedLimitException();
    } else {
      if(this.head >= this.tail) doFill();
      final int r = this.buffer[this.head++] & 0xFF;
      ++this.readCount;
      return r;
View Full Code Here

 
  @Override
  public int read(final byte b[], final int off, final int len) throws IOException {
    if(this.readLimit > 0 && (this.readCount + len) > this.readLimit) {
      this.readCount += doRead(b, off, this.readLimit - this.readCount);
      throw new ExceedLimitException();
    } else {
      this.readCount += doRead(b, off, len);
      return len; // always read the number of bytes specified by parameter "len"
    }
  }
View Full Code Here

TOP

Related Classes of com.google.code.or.io.ExceedLimitException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.