loss of data depending on security permissions

Discussion in 'Java' started by Christian Schott, Mar 4, 2004.

  1. Hallo Java Programmer People.

    Hopefully that is the right Place for asking that Question, otherwise
    i apologize for wasting your time.

    I load a Bitmap (filename.bmp) in an Applet from a the Webserver that
    hosts the Applet.

    BufferedImage bi = ImageIO.read(url);

    Unfortunately some Data seems to be lost on its way.
    If I Read *.bmp Images it seems that some Rows of the Bitmap are not
    fully loaded, they are partly set to Black.
    If I Read JPEG Images instead the dataloss has the effect that the
    images are a little wishy-washy.

    In the Netbeans IDE everything works fine if i use Debug mode.
    The same if i grant all permissions in the java.policy file.

    Any suggestions where the problem comes from and maybe how to get rid
    of it without granting permissions.

    Any Help on this would be great !

    Thanx for spending your time in reading this.

    regards

    Christian Schott

    Plattform: Windows
    Browser : Netscape and IE using the latest Java Plugin.
    Christian Schott, Mar 4, 2004
    #1
    1. Advertising

  2. On 4 Mar 2004 02:57:39 -0800, Christian Schott wrote:

    > I load a Bitmap (filename.bmp)


    What are you gonna call your
    other picture? [ ;-) ]

    >..in an Applet from a the Webserver that
    > hosts the Applet.


    What applet? What web server? What URL?

    <http://www.physci.org/codes/sscce.jsp#eg>
    'Example - Extra Points'

    --
    Andrew Thompson
    * http://www.PhySci.org/ Open-source software suite
    * http://www.PhySci.org/codes/ Web & IT Help
    * http://www.1point1C.org/ Science & Technology
    Andrew Thompson, Mar 4, 2004
    #2
    1. Advertising

  3. Hallo Andre



    Andrew Thompson <> wrote in message news:<1mf69x84hl51r.7c3tli5fsnqh$>...
    > On 4 Mar 2004 02:57:39 -0800, Christian Schott wrote:
    >
    > > I load a Bitmap (filename.bmp)


    just to make clear that it is an *.bmp file.

    >
    > What are you gonna call your
    > other picture? [ ;-) ]


    Actually the Images are streamed via ASP and not named at all ;-).

    >
    > >..in an Applet from a the Webserver that
    > > hosts the Applet.

    >
    > What applet? What web server? What URL?


    A Java2 Applet written using the sun sdk j2sdk1.4.1_04.

    I HAVE TO use IIS as Webserver.

    regardz

    Christian Schott
    Christian Schott, Mar 4, 2004
    #3
  4. Christian Schott

    John Davison Guest

    "Christian Schott" <> wrote in message
    news:...
    > Hallo Java Programmer People.
    >
    > Hopefully that is the right Place for asking that Question, otherwise
    > i apologize for wasting your time.
    >
    > I load a Bitmap (filename.bmp) in an Applet from a the Webserver that
    > hosts the Applet.
    >
    > BufferedImage bi = ImageIO.read(url);
    >
    > Unfortunately some Data seems to be lost on its way.
    > If I Read *.bmp Images it seems that some Rows of the Bitmap are not
    > fully loaded, they are partly set to Black.
    > If I Read JPEG Images instead the dataloss has the effect that the
    > images are a little wishy-washy.
    >
    > In the Netbeans IDE everything works fine if i use Debug mode.
    > The same if i grant all permissions in the java.policy file.


    You don't need extra security permissions to load a URL from the server
    hosting the applet.

    Are you sure that "data is lost of the way"? Can you verify that? Could it
    be the way you're displaying the Image? Or could it be your ASP script
    sending the image? Perhaps it's not sending the correct header information,
    such as the size and dimensions of the image.

    Suggestions:
    Use a sniffer to verify URL transactions: compare these transactions to one
    made by a web browser and see if there is any difference.
    Save the downloaded image to a file and do a binary compare. Download the
    image through a web browser and compare it to your original.
    John Davison, Mar 4, 2004
    #4
  5. On 4 Mar 2004 07:36:39 -0800, Christian Schott wrote:

    > Hallo Andre


    It's Andrew

    >>>..in an Applet from a the Webserver that
    >>> hosts the Applet.

    >>
    >> What applet? What web server? What URL?

    >
    > A Java2 Applet written using the sun sdk j2sdk1.4.1_04.


    Let me rehprase that.
    The _URL_?
    The SSCCE?
    <http://www.physci.org/codes/sscce.jsp>

    Rather than talk about, or describe, your
    code, give an URL, give the source.

    --
    Andrew Thompson
    * http://www.PhySci.org/ Open-source software suite
    * http://www.PhySci.org/codes/ Web & IT Help
    * http://www.1point1C.org/ Science & Technology
    Andrew Thompson, Mar 5, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. carlos perez
    Replies:
    0
    Views:
    406
    carlos perez
    Jun 8, 2004
  2. Scott Allen
    Replies:
    0
    Views:
    426
    Scott Allen
    Jul 13, 2004
  3. Curt K
    Replies:
    0
    Views:
    555
    Curt K
    Nov 3, 2006
  4. John Mackerras

    Template Column data depending on form data

    John Mackerras, Nov 15, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    131
    John Mackerras
    Nov 15, 2004
  5. Leyla
    Replies:
    2
    Views:
    663
    Leyla
    Aug 17, 2006
Loading...

Share This Page