
126 Java Stand-alone Applications on z/OS Volume II
*/
private static StringBuffer printBytes(byte[] bytes, int nRead) {
String encoding = null;
StringBuffer sb = null;
try {
encoding = ZUtil.getDefaultPlatformEncoding();
sb = new StringBuffer(new String(bytes, 0, nRead,
encoding));
} catch (UnsupportedEncodingException uee) {
uee.printStackTrace();
}
return sb;
}
}
7.4 JZOS versus JRIO
The JZOS toolkit API and the JRIO library both contain methods for performing
I/O in the z/OS environment. They are complementary to each other and provide
you not only with a choice of how to access and work with files and data sets, but
also with a choice about ...