>>673
まず、read() 一発で全データを読める保証が無いということに気づけ。
それから、質問するなら相手に意図の伝わる日本語書け。

InputStream in = null;
byte[] buffer = new byte[1024];
ByteArrayOutputStream out = new ByteArrayOutputStream();
try{
  in = url.openStream();
  while(true){
    int len = in.read(buffer);
    if(len < 0)  break;
    out.write(buffer);
  }
} catch(IOException ex){
  ex.printStackTrace();
} finally {
  try{
    if(in != null)  in.close();
  } catch(IOException ex){
    ex.printStackTrace();
  }
}
return out.toByteArray();