/** * This is used to acquire the contents of the body as a stream. * Each time this method is invoked a new stream is created that * will read the contents of the body from the first byte. This * ensures that the stream can be acquired several times without * any issues arising from previous reads. * * @return this returns a new string used to read the body */ public InputStream getInputStream() throws IOException { if(buffer == null) { return new EmptyInputStream(); } return buffer.open(); } }
/** * This is used to acquire the contents of the body as a stream. * Each time this method is invoked a new stream is created that * will read the contents of the body from the first byte. This * ensures that the stream can be acquired several times without * any issues arising from previous reads. * * @return this returns a new string used to read the body */ public InputStream getInputStream() throws IOException { if(buffer == null) { return new EmptyInputStream(); } return buffer.open(); } }
/** * This is used to acquire the contents of the body as a stream. * Each time this method is invoked a new stream is created that * will read the contents of the body from the first byte. This * ensures that the stream can be acquired several times without * any issues arising from previous reads. * * @return this returns a new string used to read the body */ public InputStream getInputStream() throws IOException { if(buffer == null) { return new EmptyInputStream(); } return buffer.open(); } }