public class SyncProtocol.SyncMultiBulkResponse extends SyncProtocol.SyncMultiLineResponseBase implements MultiBulkResponse
Response.Type
Constructor and Description |
---|
SyncMultiBulkResponse(byte[] buff,
Command cmd) |
Modifier and Type | Method and Description |
---|---|
List<byte[]> |
getMultiBulkData() |
void |
read(InputStream in)
Reads itself from the provided
InputStream |
protected void |
reset(Command cmd) |
readBulkData
reset
assertResponseRead, didRead, didRead, getStatus, getType, isError, write
public SyncMultiBulkResponse(byte[] buff, Command cmd)
protected void reset(Command cmd)
public List<byte[]> getMultiBulkData() throws ClientRuntimeException, ProviderException
getMultiBulkData
in interface MultiBulkResponse
List.size()
will return
the same number that is received from the server, with the exceptionClientRuntimeException
- if data access is attempted before the response has been read, or,
if the provided InputStream
presents any problems.ProviderException
- for any other errors beyond system level (stream, network, etc.) or
user errors (such as attempting getData before the response has been read.public void read(InputStream in) throws ClientRuntimeException, ProviderException
Message
InputStream
read
in interface Message
in
- the steam to read from.ClientRuntimeException
- to indicate a system error, potentially network related
and hopefully recoverable. Typically used to wrap and propagate the IO stream's thrown
IOException
s.ProviderException
- to indicate operational error not directly related to the stream,
and should be treated as a bug.Copyright © 2009–2015. All rights reserved.