Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Big endian - Little endian conversion

807606May 23 2007 — edited May 23 2007
Hi all, I'm a new user!
I'm working with As400 and java using jtopen.
With this code:
PrintObjectTransformedInputStream is = spoolFile.getTransformedInputStream(printParms);            
BufferedInputStream bufIn = new BufferedInputStream(is);                        
BufferedOutputStream bufOut = new BufferedOutputStream(new FileOutputStream("c:/x.tif"));
            
int c;
while ((c = bufIn.read()) != -1) {
     bufOut.write(c);
}

bufIn.close();
bufOut.close();
I'm getting a tiff stream and then write it to a file. The tiff stream is in Big endian format, but I need a tiff in Little endian format.
How can I convert the stream from Big endian to Little endian?
Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 20 2007
Added on May 23 2007
6 comments
548 views