Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Java 1.4.2, System clipboard not working for Images



"sanjeev kumar" <email@hidden> wrote:

> byte []bf = new byte[512];
> ByteArrayOutputStream bos = new ByteArrayOutputStream();
> bos.write(bf,0,bf.length);
> int rb;
> while((rb = is.read(buffer,0,buffer.length)) > 0){
> bos.write(buffer,0,rb);
> }
> bos.close();
> byte []buffer = bos.toByteArray();
> if(buffer == null) return;
> ByteArrayInputStream bos = new
>ByteArrayInputStream(buffer);

I highly recommend java.io.SequenceInputStream.

Less quoting of vast tracts of prior message text would also be nice.

-- GG
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.