gnu.x11
Class ResponseInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by gnu.x11.ResponseInputStream
All Implemented Interfaces:
java.io.Closeable

public class ResponseInputStream
extends java.io.FilterInputStream

Reads response data from the X server.

Author:
Roman Kennke (roman@kennke.org)

Field Summary
 
Fields inherited from class java.io.FilterInputStream
in
 
Method Summary
 void pad(int n)
           
 java.util.List pull_all_events()
          Pulls all pending events out of the queue.
 boolean read_bool()
           
 int read_byte()
          Reads an (unsigned) byte value from the underlying stream.
 void read_data(byte[] buf)
           
 void read_data(byte[] buf, int offset, int len)
           
 Event read_event()
           
 float read_float32()
           
 double read_float64()
           
 int read_int16()
          Reads an INT16 value from the stream.
 int read_int32()
          Reads an INT32 value from the stream.
 long read_int64()
          Reads an INT32 value from the stream.
 int read_int8()
           
 void read_reply(RequestOutputStream out)
          Flushes the currently pending request and starts reading the reply.
 java.lang.String read_string8(int len)
           
 long skip(long n)
          Skips n bytes in the stream.
 
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, read, read, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

skip

public long skip(long n)
Skips n bytes in the stream.

Overrides:
skip in class java.io.FilterInputStream
Parameters:
n - the number of bytes to skip
Returns:
the actual number of bytes skipped

read_int8

public int read_int8()

read_int16

public int read_int16()
Reads an INT16 value from the stream.

Returns:
the value

read_int32

public int read_int32()
Reads an INT32 value from the stream.

Returns:
the value

read_int64

public long read_int64()
Reads an INT32 value from the stream.

Returns:
the value

read_float32

public float read_float32()

read_float64

public double read_float64()

read_string8

public java.lang.String read_string8(int len)

pad

public void pad(int n)

read_bool

public boolean read_bool()

read_byte

public int read_byte()
Reads an (unsigned) byte value from the underlying stream.

Returns:
the byte value

read_data

public void read_data(byte[] buf,
                      int offset,
                      int len)

read_data

public void read_data(byte[] buf)

read_event

public Event read_event()

pull_all_events

public java.util.List pull_all_events()
Pulls all pending events out of the queue.

Returns:
all pending events

read_reply

public void read_reply(RequestOutputStream out)
Flushes the currently pending request and starts reading the reply. The specified sequence number is used to check the reply sequence number.

Parameters:
seq_no - the sequence number of the request