Examples of BufferException


Examples of org.jnetstream.capture.file.BufferException

  public void skip() throws IOException {
    final long regional = this.segment.mapGlobalToRegional(this.global);
    final long length = this.getRecordLength(regional, this.headerReader);

    if (length < this.headerReader.getMinLength()) {
      throw new BufferException("Read length is less then minimum length",
          null, regional, (int) length, false, this.headerReader);
    }
   
    this.setPosition(this.global + length);
View Full Code Here

Examples of org.simpleframework.util.buffer.BufferException

      write(array, 0, array.length);
   }

   public synchronized void write(byte[] array, int off, int size) throws IOException {
      if(closed) {
         throw new BufferException("Queue has been closed");
      }
      if (size + count > buffer.length) {
         expand(count + size);
      }
      int fragment = buffer.length - seek; // from read pos to end
View Full Code Here

Examples of org.simpleframework.util.buffer.BufferException

            if(closed) {
               return -1;
            }
            wait();
         } catch(Exception e) {
            throw new BufferException("Thread interrupted", e);
         }
      }
      int chunk = Math.min(size, count);
     
      if(chunk > 0) {
View Full Code Here

Examples of org.simpleframework.util.buffer.BufferException

      return chunk;
   }  
  
   private synchronized void expand(int capacity) throws IOException {
      if (capacity > limit) {
         throw new BufferException("Capacity limit %s exceeded", limit);
      }
      int resize = buffer.length * 2;
      int size = Math.max(capacity, resize);
      byte[] temp = new byte[size];

View Full Code Here

Examples of org.simpleframework.util.buffer.BufferException

      seek = 0;
   }
  
   public synchronized void reset() throws IOException {
      if(closed) {
         throw new BufferException("Queue has been closed");
      }
      seek = 0;
      count = 0;
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.