SMILA 1.0 API documentation

org.eclipse.smila.ipc
Interface IpcStreamReader

All Known Implementing Classes:
BinaryStreamReader, JsonStreamReader

public interface IpcStreamReader

Streaming API based reader for the IPC protocol.

Author:
aweber

Method Summary
 void close()
          Closes the reader and the underlying stream.
 void closeWithoutStream()
          Closes the reader but NOT the underlying stream.
 byte[] currentBinaryValue()
          Returns the current token value as binary value.
 boolean currentBoolValue()
          Returns the current token value as boolean value.
 double currentDoubleValue()
          Returns the current token value as double value.
 long currentLongValue()
          Returns the current token value as long value.
 java.lang.String currentStringValue()
          Returns the current token value as string.
 java.io.InputStream getStream()
          throws UnsupportedOperationException if not implemented by this response implementation.
 byte[] nextBinaryValue()
          Shortcut for nextToken() + currentBinaryValue().
 boolean nextBoolValue()
          Shortcut for nextToken() + currentBoolValue().
 double nextDoubleValue()
          Shortcut for nextToken() + currentDoubleValue().
 long nextLongValue()
          Shortcut for nextToken() + currentLongValue().
 java.lang.String nextStringValue()
          Shortcut for nextToken() + currentStringValue().
 IpcToken nextToken()
          Returns the next token.
 

Method Detail

getStream

java.io.InputStream getStream()
throws UnsupportedOperationException if not implemented by this response implementation.

Returns:
the internal stream.

close

void close()
           throws java.io.IOException
Closes the reader and the underlying stream.

Throws:
java.io.IOException - any error

closeWithoutStream

void closeWithoutStream()
                        throws java.io.IOException
Closes the reader but NOT the underlying stream.

Throws:
java.io.IOException - any error

nextToken

IpcToken nextToken()
                   throws java.io.IOException
Returns the next token.

Returns:
next token
Throws:
java.io.IOException - any error

currentStringValue

java.lang.String currentStringValue()
                                    throws java.io.IOException
Returns the current token value as string.

Returns:
current token value as string
Throws:
java.io.IOException - any error

nextStringValue

java.lang.String nextStringValue()
                                 throws java.io.IOException
Shortcut for nextToken() + currentStringValue().

Returns:
next token value as string
Throws:
java.io.IOException - any error

currentLongValue

long currentLongValue()
                      throws java.io.IOException
Returns the current token value as long value.

Returns:
current token value as long value
Throws:
java.io.IOException - any error

nextLongValue

long nextLongValue()
                   throws java.io.IOException
Shortcut for nextToken() + currentLongValue().

Returns:
next token value as long
Throws:
java.io.IOException - any error

currentDoubleValue

double currentDoubleValue()
                          throws java.io.IOException
Returns the current token value as double value.

Returns:
current token value as double
Throws:
java.io.IOException - any error

nextDoubleValue

double nextDoubleValue()
                       throws java.io.IOException
Shortcut for nextToken() + currentDoubleValue().

Returns:
next token value as double
Throws:
java.io.IOException - any error

currentBoolValue

boolean currentBoolValue()
                         throws java.io.IOException
Returns the current token value as boolean value.

Returns:
current token value as boolean
Throws:
java.io.IOException - any error

nextBoolValue

boolean nextBoolValue()
                      throws java.io.IOException
Shortcut for nextToken() + currentBoolValue().

Returns:
next token value as boolean.
Throws:
java.io.IOException - any error.

currentBinaryValue

byte[] currentBinaryValue()
                          throws java.io.IOException
Returns the current token value as binary value.

Returns:
current token value as binary
Throws:
java.io.IOException - any error

nextBinaryValue

byte[] nextBinaryValue()
                       throws java.io.IOException
Shortcut for nextToken() + currentBinaryValue().

Returns:
next token value as binary.
Throws:
java.io.IOException - any error.

SMILA 1.0 API documentation