Package net.targetr.wtm3.io
Class MetadataReader
java.lang.Object
net.targetr.wtm3.io.MetadataReader
Reads from an InputStream until all metadata is read.
Most protocols define the end of requests and responses as CR LF CR LF. This class reads a stream until this boundary then returns a String of the contents.
After multiple attempts at more efficient reading, this was chosen for simplicity.
- Author:
- Dr Michael Gardiner
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Reads from an input stream until a standard metadata boundary is reached.
-
Method Details
-
readMeta
Reads from an input stream until a standard metadata boundary is reached.- Parameters:
in
- The input stream to read from.- Returns:
- A string representation of the request.
- Throws:
IOException
- If there is a problem reading from the stream.
-