code: public static boolean skipUntil(InputStream in, byte separator) throws IOException {
          int r;
          while((r = in.read()) >= 0) {
              if(((byte) r) == separator) { return true; }
          }
          return false;
      }
docs: Skip all bytes in stream until (and including) given byte is found.
  
  @param in Input stream to read from.
  @param separator Byte to skip until.
  @return True iff the separator was encountered.
  @throws IOException if unable to read from stream.