microsoft-azure-storage/src/com/microsoft/azure/storage/queue/QueueMessageHandler.java
public static ArrayList<CloudQueueMessage> readMessages(final InputStream stream, final boolean shouldEncodeMessage)
            throws SAXException, IOException, ParserConfigurationException {
        SAXParser saxParser = Utility.getSAXParser();
        QueueMessageHandler handler = new QueueMessageHandler(shouldEncodeMessage);
        saxParser.parse(stream, handler);

        return handler.messages;
    }
public static ArrayList<CloudQueueMessage> readMessages(final InputStream stream, final boolean shouldEncodeMessage)
            throws SAXException, IOException, ParserConfigurationException {
        SAXParser saxParser = Utility.getSAXParser();
        QueueMessageHandler handler = new QueueMessageHandler(shouldEncodeMessage);
        saxParser.parse(stream, handler);

        return handler.messages;
    }
Populates CloudQueueMessage objects from the XMLStreamReader; the reader must be at the Start element of
QueuesElement.

@param stream
The <code>InputStream</code> object to deserialize from.
@param shouldEncodeMessage
A flag indicating whether messages should be base-64 encoded.

@return An <code>ArrayList</code> of {@link CloudQueueMessage} from the
stream.

@throws IOException
@throws SAXException
@throws ParserConfigurationException