输出指定验证码图片流
@param w
@param h
@param os
@param code
@throws IOException
761465
public static void outputImage(int w, int h, OutputStream os, String code) throws IOException{
        int verifySize = code.length();
        BufferedImage image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
        Random rand = new Random();
        Graphics2D g2 = image.createGraphics();
        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
        Color[] colors = new Color[5];
        Color[] colorSpaces = new Color[] { Color.WHITE, Color.CYAN,
                Color.GRAY, Color.LIGHT_GRAY, Color.MAGENTA, Color.ORANGE,
                Color.PINK, Color.YELLOW };
        float[] fractions = new float[colors.length];
        for(int i = 0; i < colors.length; i++){
            colors[i] = colorSpaces[rand.nextInt(colorSpaces.length)];
            fractions[i] = rand.nextFloat();
        }
        Arrays.sort(fractions);

        g2.setColor(Color.GRAY);// 设置边框色
        g2.fillRect(0, 0, w, h);

        Color c = getRandColor(200, 250);
        g2.setColor(c);// 设置背景色
        g2.fillRect(0, 2, w, h-4);

        //绘制干扰线
        Random random = new Random();
        g2.setColor(getRandColor(160, 200));// 设置线条的颜色
        for (int i = 0; i < 20; i++) {
            int x = random.nextInt(w - 1);
            int y = random.nextInt(h - 1);
            int xl = random.nextInt(6) + 1;
            int yl = random.nextInt(12) + 1;
            g2.drawLine(x, y, x + xl + 40, y + yl + 20);
        }

        // 添加噪点
        float yawpRate = 0.05f;// 噪声率
        int area = (int) (yawpRate * w * h);
        for (int i = 0; i < area; i++) {
            int x = random.nextInt(w);
            int y = random.nextInt(h);
            int rgb = getRandomIntColor();
            image.setRGB(x, y, rgb);
        }

        shear(g2, w, h, c);// 使图片扭曲

        g2.setColor(getRandColor(100, 160));
        int fontSize = h-4;
        Font font = new Font("Algerian", Font.ITALIC, fontSize);
        g2.setFont(font);
        char[] chars = code.toCharArray();
        for(int i = 0; i < verifySize; i++){
            AffineTransform affine = new AffineTransform();
            affine.setToRotation(Math.PI / 4 * rand.nextDouble() * (rand.nextBoolean() ? 1 : -1), (w / verifySize) * i + fontSize/2, h/2);
            g2.setTransform(affine);
            g2.drawChars(chars, i, 1, ((w-10) / verifySize) * i + 5, h/2 + fontSize/2 - 10);
        }

        g2.dispose();
        ImageIO.write(image, "jpg", os);
    }
925334
@Override
    public void sawOpcode(int seen) {
        boolean sawResource = false;
        try {
            stack.precomputation(this);

            if (seen == Const.INVOKEVIRTUAL) {
                sawResource = processInvokeVirtual();
            } else if (seen == Const.INVOKESPECIAL) {
                sawResource = processInvokeSpecial();
            }

        } finally {
            stack.sawOpcode(this, seen);
            if (sawResource && (stack.getStackDepth() > 0)) {
                OpcodeStack.Item item = stack.getStackItem(0);
                item.setUserValue(Boolean.TRUE);
            }
        }
    }
1136882
public static void writeOut(BufferedImage image, OutputStream os, String format) throws IOException {
	ImageIO.write(image, format, os);

    }
473280
public void writeContent(OutputStream os) throws IOException {
        if (streamBytes != null)
            streamBytes.writeTo(os);
        else if (bytes != null)
            os.write(bytes);
    }
461610
protected void writeClassMapping (int code, Class<?> sclass)
        throws IOException
    {
        writeShort(code);
        String cname = sclass.getName();
        if (_translations != null) {
            String tname = _translations.get(cname);
            if (tname != null) {
                cname = tname;
            }
        }
        writeUTF(cname);
    }
108208
public void code(Cache<G> cache, G xgen) throws APIException, IOException {
		code(null, null,cache,xgen);
	}
1224217
protected static FlushableDataOutput writeHeader(final ManagementProtocolHeader header, final OutputStream os) throws IOException {
        final FlushableDataOutput output = FlushableDataOutputImpl.create(os);
        header.write(output);
        return output;
    }
849972
private void writeWrappingCode (final Wrapping code) {
    final Preferences docPreferences = CodeStylePreferences.get(this.document).getPreferences();
    docPreferences.put(SimpleValueNames.TEXT_LINE_WRAP, code.getValue());
    try {
      docPreferences.flush();
    }
    catch (BackingStoreException ex) {
      LOGGER.error("Can't write wrapping code", ex);
    }
  }
124678
private static Response failure(final Throwable err, final int code)
        throws IOException {
        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
        try (PrintStream stream = new Utf8PrintStream(baos, false)) {
            err.printStackTrace(stream);
        }
        return new RsWithStatus(
            new RsText(new ByteArrayInputStream(baos.toByteArray())),
            code
        );
    }
1031386
public static void sendCloseBlocking(final int code, String reason, final WebSocketChannel wsChannel) throws IOException {
        sendCloseBlocking(new CloseMessage(code, reason), wsChannel);
    }
632240
@Override
    public void write(int c) throws IOException {
    	for(OutputStream os : oss) {
    		os.write(c);
    	}
    }
1000920
public void error(OutputStream os,
                    String to,
                    HeadersAmp headers,
                    ErrorAmp error)
    throws IOException
  {
    init(os);

    OutH3 out = _out;

    if (out == null)
      return;

    if (log.isLoggable(Level.FINEST)) {
      log.finest("error" + error
                 + " (in " + this + ")" + " {to:" + to + ", " + headers + "}");
    }

    out.writeLong(MessageTypeHamp.ERROR.ordinal());
    writeHeaders(out, headers);
    
    writeFromAddress(out, to);

    out.writeString(error.getCode().toString());
    out.writeString(error.getMessage());
    out.writeObject(error.getDetail());

    //out.flushBuffer();
    out.flush();
  }
1198946
public final void mWS() throws RecognitionException {
        try {
            int _type = WS;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // src/riemann/Query.g:95:5: ( ( ' ' | '\\t' | '\\r' | '\\n' ) )
            // src/riemann/Query.g:95:9: ( ' ' | '\\t' | '\\r' | '\\n' )
            {
            if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) {
                input.consume();

            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                recover(mse);
                throw mse;}

            _channel=HIDDEN;

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
1324369
public static void decodeIgnoreWhitespace(Reader r, OutputStream os)
    throws IOException
  {
    while (true) {
      int ch0 = readNonWhitespace(r);
      int ch1 = readNonWhitespace(r);
      int ch2 = readNonWhitespace(r);
      int ch3 = readNonWhitespace(r);

      if (ch1 < 0)
        break;
      if (ch2 < 0)
        ch2 = '=';
      if (ch3 < 0)
        ch3 = '=';

      int chunk = ((_decode[ch0] << 18)
          + (_decode[ch1] << 12)
          + (_decode[ch2] << 6)
          + (_decode[ch3]));

      os.write((byte) ((chunk >> 16) & 0xff));

      if (ch2 != '='  && ch2 != -1)
        os.write((byte) ((chunk >> 8) & 0xff));
      if (ch3 != '=' && ch3 != -1)
        os.write((byte) ((chunk & 0xff)));
      else
        break;
    }
    os.flush();
  }
357273
public void writeWindowFrame(int windowSize) throws IOException {
        ByteArrayOutputStream output = new ByteArrayOutputStream();

        output.write(PROTOCOL_VERSION.getBytes(UTF_8));//Protocol version
        output.write(WINDOW_SIZE_FRAME_TYPE.getBytes(UTF_8)); //Frame type 'W'
        output.write(ByteBuffer.allocate(4).putInt(windowSize).array());//32-bit window size

        lastUsedTime = System.currentTimeMillis();
        out.write(output.toByteArray());
        out.flush();
    }
98296
public final void mWS() throws RecognitionException {
		try {
			int _type = WS;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:274:9: ( ( ' ' | '\\t' | '\\f' )+ )
			// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:274:17: ( ' ' | '\\t' | '\\f' )+
			{
			// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:274:17: ( ' ' | '\\t' | '\\f' )+
			int cnt1=0;
			loop1:
			while (true) {
				int alt1=2;
				int LA1_0 = input.LA(1);
				if ( (LA1_0=='\t'||LA1_0=='\f'||LA1_0==' ') ) {
					alt1=1;
				}

				switch (alt1) {
				case 1 :
					// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:
					{
					if ( input.LA(1)=='\t'||input.LA(1)=='\f'||input.LA(1)==' ' ) {
						input.consume();
						state.failed=false;
					}
					else {
						if (state.backtracking>0) {state.failed=true; return;}
						MismatchedSetException mse = new MismatchedSetException(null,input);
						recover(mse);
						throw mse;
					}
					}
					break;

				default :
					if ( cnt1 >= 1 ) break loop1;
					if (state.backtracking>0) {state.failed=true; return;}
					EarlyExitException eee = new EarlyExitException(1, input);
					throw eee;
				}
				cnt1++;
			}

			if ( state.backtracking==0 ) { _channel=HIDDEN;}
			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
342985
public void compiled(byte[] code) {
        javaByteCode = code;
        //enhancedByteCode = code;
        compiled = true;
        RythmEvents.COMPILED.trigger(engine(), code);
        enhance();
        //compiled(code, false);
    }