Bill J. wrote:
>This sounds like the old "open files in binary mode" bug (feature?) in
>Windows.  After the call to create the output_stream

>    ByteArrayOutputStream output_stream = new ByteArrayOutputStream();

>perhaps on Windows you have to make some additional call to make sure it's
>in binary mode?  Or, when you write it to a FileOutputStream, perhaps you
>have to take some additional care to make sure *that* stream is in binary
>mode?

I agree that this sounds like a problem particular to Windows that we have
seen before.  There isn't a call on output_stream to make and all Java
should act the same in this regard.

I don't think it's a problem with my Java.  I'm using
      ByteArrayOutputStream output_stream = new ByteArrayOutputStream();
which should create a byte level output stream.  Then I do
            byte[] outBytes = output_stream.toByteArray();
which also does not translatet the bytes.  When I look at the array
created, I can see the translation of bytes has already happened (before it
gets written to disk).  I think it might be happening when you are writing
to the output stream, but I can't see that Java source, so I don't know for
sure.  Is there a way you can jar up the source files as well as the class
files so I can step through and see what's going on?

Thanks
Bill




                                                                                       
                                    
                                                                                       
                                    
                                                      To:       
[EMAIL PROTECTED]                              
                      Bill Janssen                    cc:       (bcc: Bill 
Nalen/Towers Perrin)                            
                      <[EMAIL PROTECTED]>              Subject:  Re: new experimental 
Java version of the distiller         
                      Sent by:                                                         
                                    
                      plucker-dev-admin@rubber                                         
                                    
                      chicken.org                                                      
                                    
                                                                                       
                                    
                                                                                       
                                    
                      11/04/2002 04:18 PM                                              
                                    
                      Please respond to                                                
                                    
                      plucker-dev                                                      
                                    
                                                                                       
                                    
                                                                                       
                                    




> I don't get a
> valid pdb file as output.  It looks like there is some translation of
bytes
> going on in the stream since it appends a x0d to each x0a.  Also the
record
> offset for the third record in my case was invalid (it's value was x3f
> which points inside the pdb header).

This sounds like the old "open files in binary mode" bug (feature?) in
Windows.  After the call to create the output_stream

    ByteArrayOutputStream output_stream = new ByteArrayOutputStream();

perhaps on Windows you have to make some additional call to make sure it's
in binary mode?  Or, when you write it to a FileOutputStream, perhaps you
have to take some additional care to make sure *that* stream is in binary
mode?

Bill


_______________________________________________
plucker-dev mailing list
[EMAIL PROTECTED]
http://lists.rubberchicken.org/mailman/listinfo/plucker-dev





_______________________________________________
plucker-dev mailing list
[EMAIL PROTECTED]
http://lists.rubberchicken.org/mailman/listinfo/plucker-dev

Reply via email to