sk::io::DataInputStream Class Reference

#include <DataInputStream.h>

Inheritance diagram for sk::io::DataInputStream:

sk::io::DelegatingInputStream sk::io::DataInput sk::io::AbstractInputStream sk::util::Object sk::io::InputStream sk::util::Object

List of all members.

Public Member Functions

 DataInputStream (sk::io::InputStream &stream)
virtual ~DataInputStream ()
const sk::util::Class getClass () const
 Returns the object's class.
int readInt ()
 Reads four input bytes and returns an int value.
long long readLong ()
 Reads eight input bytes and returns a long long value.
short readShort ()
 Reads two input bytes and returns a short value.
char readChar ()
 Reads an input char and returns the char value.
double readDouble ()
 Reads eight input bytes and returns a double value.
float readFloat ()
 Reads four input bytes and returns a float value.
int skipBytes (int number)
 Makes an attempt to skip over n bytes of data from the input stream, discarding the skipped bytes.
const sk::util::String readLine ()
 Reads the next line of text from the input stream.
std::vector< char > & readFully (std::vector< char > &buffer, int number)
 Reads exactly number input bytes and stores them in the specified vector of chars. Blocks if the data is not yet available. Returns a reference to the same vector.
std::vector< char > readFully (int number)
 Reads exactly number input bytes and returns them as a vector of chars. Blocks if the data is not yet available.
sk::io::InputStreamgetInputStream () const
void close ()
 Closes this input stream and releases any system resources associated with the stream.
int skip (int number)
 Skips over and discards n bytes of data from this input stream.
long long available () const
 Returns the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream.
bool markSupported () const
 Tests if this input stream supports the mark and reset methods.
void mark (int readlimit)
 Marks the current position in this input stream.
void reset ()
 Repositions this stream to the position at the time the mark method was last called on this input stream.
int read (char *buffer, int offset, int length)
 Reads up to lenght bytes of data from the input stream into an array of bytes starting from offset.
char read ()
 Reads the next byte of data from the input stream.
std::vector< char > read (int number)
 Reads up to number bytes of data from the input stream and returns them as a vector of chars.
std::vector< char > & read (std::vector< char > &buffer, int number)
 Reads up to number bytes of data from the input stream into the specified vector of chars. The vector size will be adjusted depending on the actual amount of date read. Returns a reference to the same vectory.
virtual Object & self ()
 Returns a reference to itself.
virtual const Object & self () const
Object * clone () const
 Instantiates another object of the same class as a copy of itself.
virtual uint64_t getId () const
 Returns a unique object id.
virtual const String toString () const
 Returns a string representation of the object. By default, it returns the object's class and the objects's id.
virtual const String inspect () const
 Returns a string containing human-readable representation of the object.

Protected Member Functions

int filterReadEvents (int n)


Constructor & Destructor Documentation

sk::io::DataInputStream::DataInputStream ( sk::io::InputStream stream  ) 

virtual sk::io::DataInputStream::~DataInputStream (  )  [virtual]


Member Function Documentation

long long sk::io::DelegatingInputStream::available (  )  const [virtual, inherited]

Returns the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream.

Reimplemented from sk::io::AbstractInputStream.

Object* sk::util::Object::clone (  )  const [inherited]

Instantiates another object of the same class as a copy of itself.

Reimplemented in sk::rt::logger::Destination, and sk::util::String.

void sk::io::DelegatingInputStream::close (  )  [virtual, inherited]

Closes this input stream and releases any system resources associated with the stream.

Implements sk::io::InputStream.

int sk::io::AbstractInputStream::filterReadEvents ( int  n  )  [protected, inherited]

const sk::util::Class sk::io::DataInputStream::getClass (  )  const [virtual]

Returns the object's class.

Reimplemented from sk::io::DelegatingInputStream.

virtual uint64_t sk::util::Object::getId (  )  const [virtual, inherited]

Returns a unique object id.

Reimplemented in sk::rt::Thread.

sk::io::InputStream& sk::io::DelegatingInputStream::getInputStream (  )  const [inherited]

virtual const String sk::util::Object::inspect (  )  const [virtual, inherited]

void sk::io::DelegatingInputStream::mark ( int  readlimit  )  [virtual, inherited]

Marks the current position in this input stream.

Reimplemented from sk::io::AbstractInputStream.

bool sk::io::DelegatingInputStream::markSupported (  )  const [virtual, inherited]

Tests if this input stream supports the mark and reset methods.

Reimplemented from sk::io::AbstractInputStream.

std::vector<char>& sk::io::AbstractInputStream::read ( std::vector< char > &  buffer,
int  number 
) [virtual, inherited]

Reads up to number bytes of data from the input stream into the specified vector of chars. The vector size will be adjusted depending on the actual amount of date read. Returns a reference to the same vectory.

Implements sk::io::InputStream.

std::vector<char> sk::io::AbstractInputStream::read ( int  number  )  [virtual, inherited]

Reads up to number bytes of data from the input stream and returns them as a vector of chars.

Implements sk::io::InputStream.

char sk::io::AbstractInputStream::read (  )  [virtual, inherited]

Reads the next byte of data from the input stream.

Implements sk::io::InputStream.

int sk::io::DelegatingInputStream::read ( char *  buffer,
int  offset,
int  length 
) [virtual, inherited]

Reads up to lenght bytes of data from the input stream into an array of bytes starting from offset.

Implements sk::io::AbstractInputStream.

Reimplemented in sk::io::BufferedInputStream.

char sk::io::DataInputStream::readChar (  )  [virtual]

Reads an input char and returns the char value.

Implements sk::io::DataInput.

double sk::io::DataInputStream::readDouble (  )  [virtual]

Reads eight input bytes and returns a double value.

Implements sk::io::DataInput.

float sk::io::DataInputStream::readFloat (  )  [virtual]

Reads four input bytes and returns a float value.

Implements sk::io::DataInput.

std::vector<char> sk::io::DataInputStream::readFully ( int  number  )  [virtual]

Reads exactly number input bytes and returns them as a vector of chars. Blocks if the data is not yet available.

Implements sk::io::DataInput.

std::vector<char>& sk::io::DataInputStream::readFully ( std::vector< char > &  buffer,
int  number 
) [virtual]

Reads exactly number input bytes and stores them in the specified vector of chars. Blocks if the data is not yet available. Returns a reference to the same vector.

Implements sk::io::DataInput.

int sk::io::DataInputStream::readInt (  )  [virtual]

Reads four input bytes and returns an int value.

Implements sk::io::DataInput.

const sk::util::String sk::io::DataInputStream::readLine (  )  [virtual]

Reads the next line of text from the input stream.

Implements sk::io::DataInput.

long long sk::io::DataInputStream::readLong (  )  [virtual]

Reads eight input bytes and returns a long long value.

Implements sk::io::DataInput.

short sk::io::DataInputStream::readShort (  )  [virtual]

Reads two input bytes and returns a short value.

Implements sk::io::DataInput.

void sk::io::DelegatingInputStream::reset (  )  [virtual, inherited]

Repositions this stream to the position at the time the mark method was last called on this input stream.

Reimplemented from sk::io::AbstractInputStream.

virtual const Object& sk::util::Object::self (  )  const [virtual, inherited]

Reimplemented in sk::util::String.

virtual Object& sk::util::Object::self (  )  [virtual, inherited]

Returns a reference to itself.

Reimplemented in sk::util::String.

int sk::io::DelegatingInputStream::skip ( int  number  )  [virtual, inherited]

Skips over and discards n bytes of data from this input stream.

Reimplemented from sk::io::AbstractInputStream.

int sk::io::DataInputStream::skipBytes ( int  number  )  [virtual]

Makes an attempt to skip over n bytes of data from the input stream, discarding the skipped bytes.

Implements sk::io::DataInput.

virtual const String sk::util::Object::toString (  )  const [virtual, inherited]

Returns a string representation of the object. By default, it returns the object's class and the objects's id.

Reimplemented in sk::rt::logger::Level, sk::rt::thread::State, sk::util::Boolean, sk::util::Class, sk::util::Container, sk::util::Pathname, and sk::util::String.


The documentation for this class was generated from the following file:

Generated on Tue Mar 3 12:36:09 2009 for stemkit-cpp by  doxygen 1.5.8