protected Object convertBuiltinSound(InputStream i) throws IOException {
  ByteArrayOutputStream b=new ByteArrayOutputStream();
  byte[] buffer=new byte[4096];
  int size=i.read(buffer);
  while (size > -1) {
    b.write(buffer,0,size);
    size=i.read(buffer);
  }
  b.close();
  i.close();
  return b.toByteArray();
}

protected Object convertBuiltinSound ( InputStream i ) throws IOException { ByteArrayOutputStream b = new ByteArrayOutputStream ( ) ; byte [ ] buffer = new byte [ 4096 ] ; int size = i . read ( buffer ) ; while ( size > - 1 ) { b . write ( buffer , 0 , size ) ; size = i . read ( buffer ) ; } b . close ( ) ; i . close ( ) ; return b . toByteArray ( ) ; }
converts a sound object to a form which will be easy for the implementation to play later on . e . g . a byte array or a file / file name and return an object that will allow playnativebuiltinsound ( ) to use
