SMILA 1.0 API documentation

org.eclipse.smila.http.client.impl.base
Class BulkResponseImpl

java.lang.Object
  extended by org.eclipse.smila.http.client.impl.base.BulkResponseImpl
All Implemented Interfaces:
java.io.Closeable, java.lang.Iterable<AnyMap>, java.util.Iterator<AnyMap>, BulkResponse

public class BulkResponseImpl
extends java.lang.Object
implements BulkResponse

default implementation of BulkResponse.


Constructor Summary
BulkResponseImpl(java.io.InputStream responseStream)
          create instance.
 
Method Summary
 void close()
          Closes used resources.
protected  void finalize()
           
 boolean hasNext()
          Checks if there are more objects to read from the bulk.
 java.util.Iterator<AnyMap> iterator()
           
 AnyMap next()
          Parses and returns the next object.
 void remove()
          Currently not supported by this implementation.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BulkResponseImpl

public BulkResponseImpl(java.io.InputStream responseStream)
                 throws java.io.IOException
create instance.

Throws:
java.io.IOException
Method Detail

iterator

public java.util.Iterator<AnyMap> iterator()
Specified by:
iterator in interface java.lang.Iterable<AnyMap>

hasNext

public boolean hasNext()
Checks if there are more objects to read from the bulk. Can be called repeatedly.

Specified by:
hasNext in interface java.util.Iterator<AnyMap>
Throws:
java.lang.RuntimeException - If reading the input stream fails. The IOException from the reader will be attached as the cause.

next

public AnyMap next()
Parses and returns the next object.

Specified by:
next in interface java.util.Iterator<AnyMap>
Throws:
java.util.NoSuchElementException - If no objects are available anymore.
java.lang.RuntimeException - If reading the input stream or parsing the JSON line fails. The exception from the reader or parser will be attached as the cause.

remove

public void remove()
Currently not supported by this implementation.

Specified by:
remove in interface java.util.Iterator<AnyMap>
Throws:
java.lang.UnsupportedOperationException - always.

close

public void close()
Closes used resources. Further usage is not possible afterwards.

Specified by:
close in interface java.io.Closeable

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable

SMILA 1.0 API documentation