@Override public int put(final List<T> buffer,final int from,final int to) throws IOException {
  int n=to - from;
  if (buffer.size() > n) {
    return put(buffer.subList(from,to),0,n);
  }
  n=buffer.size();
  if (n < capacity) {
    final int limit=capacity - items.size();
    if (n > limit) {
      items.removeAll(items.subList(0,n - limit));
    }
    if (!items.addAll(0,buffer)) {
      throw new IOException("Failed to put " + n + " items");
    }
  }
 else {
    items.clear();
    if (!items.addAll(buffer.subList(n - capacity,n))) {
      throw new IOException("Failed to put " + n + " items");
    }
  }
  return n;
}

@ Override public int put ( final List < T > buffer , final int from , final int to ) throws IOException { int n = to - from ; if ( buffer . size ( ) > n ) { return put ( buffer . subList ( from , to ) , 0 , n ) ; } n = buffer . size ( ) ; if ( n < capacity ) { final int limit = capacity - items . size ( ) ; if ( n > limit ) { items . removeAll ( items . subList ( 0 , n - limit ) ) ; } if ( ! items . addAll ( 0 , buffer ) ) { throw new IOException ( "Failed to put " + n + " items" ) ; } } else { items . clear ( ) ; if ( ! items . addAll ( buffer . subList ( n - capacity , n ) ) ) { throw new IOException ( "Failed to put " + n + " items" ) ; } } return n ; }
bulk circular put method
