Returns a PdfStream object with the full font program.
@return	a PdfStream with the font program
@since	2.1.3
425344
public PdfStream getFullFontStream() throws IOException, DocumentException {
        if (cff) {
            return new StreamFont(readCffFont(), "Type1C", compressionLevel);
        }
        else {
        	byte[] b = getFullFont();
        	int lengths[] = new int[]{b.length};
        	return new StreamFont(b, lengths, compressionLevel);
        }
    }
672610
@Override
    public PrintWriter getWriter() throws IOException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "getWriter: " + this);
        }
        if (this.streamActive) {
            throw new IllegalStateException("Output stream already obtained");
        }
        if (null == this.outWriter) {
            this.outWriter = new PrintWriter(
                            new OutputStreamWriter(
                                            this.outStream, getCharacterEncoding()), false);
        }
        return this.outWriter;
    }
1192961
private BufferedWriter getTextOut() {
        if (textOut == null) {
            PrintStream proxy = WeakProxy.forObject(this);
            charOut = charset != null ? new OutputStreamWriter(proxy, charset) :
                    new OutputStreamWriter(proxy);
            textOut = new BufferedWriter(charOut);
        }
        return textOut;
    }
250842
@Nonnull
  public FontSpec getCloneWithDifferentFontSize (final float fNewFontSize)
  {
    ValueEnforcer.isGT0 (fNewFontSize, "FontSize");
    if (EqualsHelper.equals (fNewFontSize, m_fFontSize))
      return this;
    return new FontSpec (m_aPreloadFont, fNewFontSize, m_aColor);
  }
307260
public InputStream toInputStream() {
        byte[] encoded = toXML().toString().getBytes(Charset.forName("UTF-8"));
        return new ByteArrayInputStream(encoded);
    }
896149
public static Font createFont(InputStream fontStream) {
		try {
			return Font.createFont(Font.TRUETYPE_FONT, fontStream);
		} catch (FontFormatException e) {
			// True Type字体无效时使用Type1字体
			try {
				return Font.createFont(Font.TYPE1_FONT, fontStream);
			} catch (Exception e1) {
				throw new UtilException(e1);
			}
		} catch (IOException e) {
			throw new IORuntimeException(e);
		}
	}
602056
protected FontStyle getFontStyle(byte[] data, int offset, Map<Integer, FontBase> fontBases)
   {
      Integer index = Integer.valueOf(MPPUtility.getByte(data, offset));
      FontBase fontBase = fontBases.get(index);
      int style = MPPUtility.getByte(data, offset + 1);
      ColorType color = ColorType.getInstance(MPPUtility.getByte(data, offset + 2));

      boolean bold = ((style & 0x01) != 0);
      boolean italic = ((style & 0x02) != 0);
      boolean underline = ((style & 0x04) != 0);

      FontStyle fontStyle = new FontStyle(fontBase, italic, bold, underline, false, color.getColor(), null, BackgroundPattern.SOLID);
      //System.out.println(fontStyle);
      return fontStyle;
   }
520798
@GET
    @Produces(MediaType.TEXT_PLAIN)
    @RequiresPermissions(I18nPermissions.KEY_READ)
    public Response exportTranslations() {
        final List<Key> keys = keyRepository.loadAll();

        return Response.ok(new StreamingOutput() {

            private boolean isFirstLine = true;

            @Override
            public void write(OutputStream os) throws IOException {
                Writer writer = new BufferedWriter(new OutputStreamWriter(os, "UTF-8"));
                for (Key key : keys) {
                    ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
                    renderer.render(byteArrayOutputStream, key, APPLICATION_CSV, printHeader(isFirstLine));
                    writer.write(byteArrayOutputStream.toString("UTF-8"));
                    isFirstLine = false;
                }
                writer.flush();
            }
        }).header(CONTENT_DISPOSITION, ATTACHMENT_FILENAME_I18N_CSV).build();
    }
629727
function getFont()
    {
        $dyHeight   = $this->_size * 20;    // Height of font (1/20 of a point)
        $icv        = $this->_color;        // Index to color palette
        $bls        = $this->_bold;         // Bold style
        $sss        = $this->_font_script;  // Superscript/subscript
        $uls        = $this->_underline;    // Underline
        $bFamily    = $this->_font_family;  // Font family
        $bCharSet   = $this->_font_charset; // Character set
        $encoding   = 0;                    // TODO: Unicode support

        $cch        = strlen($this->_font_name); // Length of font name
        $record     = 0x31;                      // Record identifier
        if ($this->_BIFF_version == 0x0500) {
            $length     = 0x0F + $cch;            // Record length
        } elseif ($this->_BIFF_version == 0x0600) {
            $length     = 0x10 + $cch;
        }
        $reserved   = 0x00;                // Reserved
        $grbit      = 0x00;                // Font attributes
        if ($this->_italic) {
            $grbit     |= 0x02;
        }
        if ($this->_font_strikeout) {
            $grbit     |= 0x08;
        }
        if ($this->_font_outline) {
            $grbit     |= 0x10;
        }
        if ($this->_font_shadow) {
            $grbit     |= 0x20;
        }

        $header  = pack("vv",         $record, $length);
        if ($this->_BIFF_version == 0x0500) {
            $data    = pack("vvvvvCCCCC", $dyHeight, $grbit, $icv, $bls,
                                          $sss, $uls, $bFamily,
                                          $bCharSet, $reserved, $cch);
        } elseif ($this->_BIFF_version == 0x0600) {
            $data    = pack("vvvvvCCCCCC", $dyHeight, $grbit, $icv, $bls,
                                           $sss, $uls, $bFamily,
                                           $bCharSet, $reserved, $cch, $encoding);
        }
        return($header . $data . $this->_font_name);
    }
1142410
public InputStream toInputStream() {
        
        String text = toXml();
        return new ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8));
        
    }
347754
PdfStream getFormXObject(int compressionLevel) throws IOException {
        PdfStream s = new PdfStream(content.toByteArray());
        s.put(PdfName.TYPE, PdfName.XOBJECT);
        s.put(PdfName.SUBTYPE, PdfName.PS);
        s.flateCompress(compressionLevel);
        return s;
    }
1305287
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
	public boolean getIncludeFontPadding (){
        return Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN && mInputView.getIncludeFontPadding();
    }
158665
private synchronized PrintStream getPrintStream(long numNewChars, String header) {
        switch (currentStatus) {
            case INIT:
                return createStream(header);
            case ACTIVE:
                if (maxFileSizeBytes > 0) {
                    long bytesWritten = currentCountingStream.count();

                    // Replace the stream if the size is or will likely be
                    // exceeded.  We're estimating one byte per char, which is
                    // only accurate for single-byte character sets.  That's
                    // fine: if a multi-byte character set is being used and
                    // we underestimate the number of bytes that will be
                    // written, we'll roll the log next time
                    if (bytesWritten + numNewChars > maxFileSizeBytes) {
                        return createStream(header);

                    }
                }
                break;
        }

        return currentPrintStream;
    }
665374
public int[] getFontBBox() {
        final int[] fbb = new int[4];
        fbb[0] = fontBBox1;
        fbb[1] = fontBBox2;
        fbb[2] = fontBBox3;
        fbb[3] = fontBBox4;

        return fbb;
    }
25784
public LongStream toStream() {
      return LongStream.iterate(memory, l -> l + 8)
            .limit(pointerCount)
            .map(UNSAFE::getLong)
            .filter(l -> l != 0);
   }
526489
protected String getCSS()
    {
        // The default styles to use
        String retVal =
            "body {\n" + "	font-family: Arial, Helvetica, sans-serif;\n" + "}\n" + "h1 {\n" + "	font-size: 1.5em;\n" + "}\n" + "th {\n"
                + "	background-color: #9DACBF;\n" + "}\n" + "table {\n" + "	border-top-style: solid;\n" + "	border-right-style: solid;\n"
                + "	border-bottom-style: solid;\n" + "	border-left-style: solid;\n" + "}\n" + "td {\n" + "	margin: 0px;\n" + "	padding-top: 2px;\n"
                + "	padding-right: 5px;\n" + "	padding-bottom: 2px;\n" + "	padding-left: 5px;\n" + "}\n" + "tr.even {\n"
                + "	background-color: #CCCCCC;\n" + "}\n" + "tr.odd {\n" + "	background-color: #FFFFFF;\n" + "}\n" + "";
        try
        {
            // Try loading one via class loader and use that one instead
            final ClassLoader cl = getClass().getClassLoader();
            final InputStream iStream = cl.getResourceAsStream( "webdav.css" );
            if ( iStream != null )
            {
                // Found css via class loader, use that one
                final StringBuilder out = new StringBuilder();
                final byte[] b = new byte[4096];
                for ( int n; ( n = iStream.read( b ) ) != -1; )
                {
                    out.append( new String( b, 0, n ) );
                }
                retVal = out.toString();
            }
        }
        catch ( final Exception ex )
        {
            LOG.error( "Error in reading webdav.css", ex );
        }

        return retVal;
    }
116255
public PdfFormField getField() throws IOException, DocumentException {
        PdfFormField field = PdfFormField.createPushButton(writer);
        field.setWidget(box, PdfAnnotation.HIGHLIGHT_INVERT);
        if (fieldName != null) {
            field.setFieldName(fieldName);
            if ((options & READ_ONLY) != 0)
                field.setFieldFlags(PdfFormField.FF_READ_ONLY);
            if ((options & REQUIRED) != 0)
                field.setFieldFlags(PdfFormField.FF_REQUIRED);
        }
        if (text != null)
            field.setMKNormalCaption(text);
        if (rotation != 0)
            field.setMKRotation(rotation);
        field.setBorderStyle(new PdfBorderDictionary(borderWidth, borderStyle, new PdfDashPattern(3)));
        PdfAppearance tpa = getAppearance();
        field.setAppearance(PdfAnnotation.APPEARANCE_NORMAL, tpa);
        PdfAppearance da = (PdfAppearance)tpa.getDuplicate();
        da.setFontAndSize(getRealFont(), fontSize);
        if (textColor == null)
            da.setGrayFill(0);
        else
            da.setColorFill(textColor);
        field.setDefaultAppearanceString(da);
        if (borderColor != null)
            field.setMKBorderColor(borderColor);
        if (backgroundColor != null)
            field.setMKBackgroundColor(backgroundColor);
        switch (visibility) {
            case HIDDEN:
                field.setFlags(PdfAnnotation.FLAGS_PRINT | PdfAnnotation.FLAGS_HIDDEN);
                break;
            case VISIBLE_BUT_DOES_NOT_PRINT:
                break;
            case HIDDEN_BUT_PRINTABLE:
                field.setFlags(PdfAnnotation.FLAGS_PRINT | PdfAnnotation.FLAGS_NOVIEW);
                break;
            default:
                field.setFlags(PdfAnnotation.FLAGS_PRINT);
                break;
        }
        if (tp != null)
            field.setMKNormalIcon(tp);
        field.setMKTextPosition(layout - 1);
        PdfName scale = PdfName.A;
        if (scaleIcon == SCALE_ICON_IS_TOO_BIG)
            scale = PdfName.B;
        else if (scaleIcon == SCALE_ICON_IS_TOO_SMALL)
            scale = PdfName.S;
        else if (scaleIcon == SCALE_ICON_NEVER)
            scale = PdfName.N;
        field.setMKIconFit(scale, proportionalIcon ? PdfName.P : PdfName.A, iconHorizontalAdjustment,
            iconVerticalAdjustment, iconFitToBounds);
        return field;
    }