开发者

need to convert a bytearray to an image without using imageIO or fileoutputstream

开发者 https://www.devze.com 2023-01-29 01:39 出处:网络
I开发者_高级运维 have to send an image over a socket . so I, the client convert the image to a bytearray and send it as such.

I开发者_高级运维 have to send an image over a socket . so I, the client convert the image to a bytearray and send it as such.

The server.. being the applet recieves the byte array. - fine till here.

I must use Java 1.3 so NO ImageIO or Image classes.

and then since we have an applet - no fileoutputstream

Any other ways??


Toolkit.getDefaultToolkit().createImage(byte[] imagedata,
                  int imageoffset,
                  int imagelength)

It returns Image and it's available @since JDK1.1 according to javadoc

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号