Hello everybody...
I've a problem. I tried to load a sound from my midp application
from a public webserver.

I've the following code:

try
{ conn = (HttpConnection) Connector.open("http://127.0.0.1/Audio1.amr"
in = conn.openInputStream();

byte[] buf = new byte[(int)conn.getLength()];
in.read(buf,0,buf.length);

try
{ Sound sound;
sound = new Sound(buf, Sound.FORMAT_WAV);
sound.init(buf, Sound.FORMAT_WAV);
sound.play(1);
}
catch (Exception e)
{
}
}
catch (IOException ex)
{ wasError = true;
errorStr = ex.getMessage();
}
finally
{ if (conn != null)
{ try
{ conn.close();
}
catch (IOException e)
{
}
}
}

...but when i try, the application loads only the first part of
the sound (1-2 seconds).

what should be the problem? thanks in advance!

P.S. Of course the IP address I've posted is a fake one!