Mailbox peek method

I am putting a data into the mailbox using put method, and using peek method i want to retrieve data from the mailbox, peek method copy the data and it won’t delete the data from the mailbox. can we access only 1st element in the mailbox or can we access 2 element through peek method.

ex:

mailbox mbx=new(4);
//generator
 repeat(4)
begin
data=$urandom;    //suppose random values are  10,20,30,40
mbx.put(data);
end

//driver
forever
begin
mbx.peek(data);  //can I copy all values(10,20,30,40)from mailbox using peek method.
#1;
end

In reply to sh88:

You cannot use a mailbox for this purpose. You only have FIFO access to the internal mailbox queue. You would have to create your own mailbox class to get access to all entries in the queue.