ICIX Interview Question

Write Java class for a blocking queue: when the queue is empty and read method is invoked, it is blocked until something is on the queue. When the queue is full and write method is invoked, it is blocked until an entry in the queue is available.