On Wednesday 26 June 2002 6:41 am, John Hunter wrote: > What is the import of testing whether theO is a an instance of > string? Will it be a string even if the data is binary? Is this just > a test to see whether anything at all was returned? If I know > beforehand that the data is binary, do I need to do this test.
Ah, we were assuming you wanted to download text. The getContent() method is going to return an object that is of the type specified by the JRE's ContentHandler for that ContentType. So using the standard JDK, you would get a String for text/plain, text/html etc, and some AWT Image object if it's a jpeg or gif. I have no idea what kind of object you're going to get from the matlab java, especially since i don't know what kind of file it is. You could try using the getContent() method, and then call getClass().getName() on it to see what it is. Then you could look in the documentation for matlab java and see if there is any special writers for writing that document type to a file. I'm still a little confused tho, in matlab java, there is no way to read a series of bytes from an InputStream? -Lkb > _______________________________________________ > Bits mailing list > [EMAIL PROTECTED] > http://www.sugoi.org/mailman/listinfo/bits _______________________________________________ Bits mailing list [EMAIL PROTECTED] http://www.sugoi.org/mailman/listinfo/bits
