The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
August 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Yes it is poosible

Posted by Amit Dubey on August 17, 2001 at 4:43 PM

> Hi,
> i need to prevent someone from just replacing the images in my applet. Is there a way how i could check for example the file size of an image from my applet? Or maybe there is a way to check the RGB-values of some pixels in the image? I could then define some final Values for the file-size(or RGB values) of my images and then just compare them with the size of the loaded images...(and if they are not equal for example just display a black rectangle, instead of the applet ). Can someone help me???
> Please mailme if you can( i_love_u_all14@hotmail.com ).
> Thank you in advance,
> sincerly Ilya Shabanov


You can use the FileInputStream object and call the function
available() which returns the number of bytes.



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us