code: public static String getOneBlock(StringBuffer stream) {
          String ret = null;
  
          int endpos = stream.indexOf("\r\n:20:", 1);
          if (endpos == -1) {
              endpos = stream.length();
          }
          if (endpos > 0) {
              ret = stream.substring(0, endpos);
          }
  
          return ret;
      }
docs: /* With this, a block always ends with \r\n-