Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.sapia.util.cursor;

Implementations of this interface are in charge of filling buffers of objects. This interface is intended to hide how the actual objects are obtained.

Author(s):
Yanick Duchesne
Copyright:
Copyright &.169; 2002-2004 Sapia Open Source Software . All Rights Reserved.
License:
Read the license.txt file of the jar or visit the license page at the Sapia OSS web site
public interface CursorFeed {

  
This method fills the given array with objects. It returns the number of objects that were fed into the array.

NOTE: this method should be implemented as a blocking one.

Parameters:
buffer an empty array, ready to receive Objects.
Returns:
the number of objects that were fed into the array.
Throws:
java.lang.Exception if a problem occurs.
  public int read(Object[] bufferthrows Exception;

  
Returns the number of pending objects; this method does not block until objects are available; it should instead return 0 in such a case.

Returns:
the number of pending objects held within this instance.
Throws:
java.lang.Exception if a problem occurs.
  public int available() throws Exception;
  
  
Closes this instance. Thereafter, any call on the read() or available() of this instance will return 0.
  public void close();
New to GrepCode? Check out our FAQ X