added method available(direction) to query both input and output buffers