public static void readStream(InputStream is) throws IOException {
  byte[] inputBuffer=new byte[256];
  while (is.read(inputBuffer) != -1) {
  }
  is.close();
}

public static void readStream ( InputStream is ) throws IOException { byte [ ] inputBuffer = new byte [ 256 ] ; while ( is . read ( inputBuffer ) != - 1 ) { } is . close ( ) ; }
reads the contents of an inputstream and does nothing with it .
