16-page7 - Some algorithms convert streams to streams, like...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Queues to Process Streams • Encrypting and decrypting with a key cipher are examples of stream processing . The real world offers many situations where a huge amount of data comes at us, and we must react to each small bit of it as we see it. • This is different from the way we usually think in intro Java, where a program has a Fxed input, which we can look at all at once, and a Fxed output.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Some algorithms convert streams to streams, like our cipher that took plaintext and keytext and gave us ciphertext. L&C used a queue to make the Fxed key act like a stream. We can establish some control of how we deal with the data by putting it in a queue as it arrives, and taking it out of the queue at our own pace. But this is potentially limited by the size of the queue....
View Full Document

Ask a homework question - tutors are online