Integration Server 10.5 | Built-In Services Reference Guide | IO Folder | Summary of Elements in this Folder | pub.io:read
 
pub.io:read
WmPublic. Reads a specified number of bytes from the InputStream and stores them into a buffer.
Input Parameters
stream
Object The InputStream. Object from which the service is to read bytes.
offset
String Optional The offset into the byte array in the buffer to which the data is written. If no value is supplied, this defaults to 0.
length
String Optional. The maximum number of bytes to read from the InputStream. If no value is supplied, the default is the length of buffer.
If the value supplied for length is greater than the length of buffer, an exception will be thrown.
buffer
Object The buffer into which data is written. This is a byte array, which can be created from a Flow service by invoking pub.io:createByteArray.
Output Parameters
stream
Object The InputStream. If any bytes were read from the stream, the stream is repositioned after the last byte read.
buffer
Object The buffer into which data was written.
bytesRead
String The number of bytes read from the InputStream and copied to buffer. If there is no more data because the end of the stream has been reached, bytesRead will be -1.