• 2 replies
  • Latest Post - ‏2011-04-21T07:03:51Z by jpava
210 Posts

Pinned topic byte arrays vs string arrays

‏2011-04-13T17:01:08Z |
Hello all, I'm new to Java programming and I'm trying to get a clear understanding regarding byte arrays and string arrays.
I have to read from a simple text file a set of ASCII display characters (400 bytes in length) and then send this ASCII data to a z/Series CICS TS 4.1 region for processing via an APPC/LU6.2 connection.

I'm going to use the FileInputStream and FileOutputStream functionality.
and the int read(byte[] Rqst_Record, 0, 400) (where Rqst_record is defined
as a byte array)

The ascii display data will be converted to EBCDIC before it is sent.

I want to "move" the contents of the byte array to a string array then convert it to EBCDIC.

When I receive a "response" from the CICS region, I need to perform this set
of operations in reverse..i.e. convert the string from EBCDIC to ASCII, then
move the data from the string array into a byte array and then written out
to a response file (again it is all displayable text)

Any ideas on how best to do this would be greatly appreciated.


Updated on 2011-04-21T07:03:51Z at 2011-04-21T07:03:51Z by jpava
  • SystemAdmin
    210 Posts

    Re: byte arrays vs string arrays

    Never mind
  • jpava
    1 Post

    Re: byte arrays vs string arrays

    Byte Array is much better than String Array. Data bandwidth will be very high when going for String Array rather than byteArray