⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bytebuffer.html

📁 IText PDF开发工具说明文档,使用很方便。
💻 HTML
📖 第 1 页 / 共 3 页
字号:
</TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;byte[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/lowagie/text/pdf/ByteBuffer.html#getBuffer()">getBuffer</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/lowagie/text/pdf/ByteBuffer.html#reset()">reset</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the size to zero.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/lowagie/text/pdf/ByteBuffer.html#setCacheSize(int)">setCacheSize</A></B>(int&nbsp;size)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the cache size.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/lowagie/text/pdf/ByteBuffer.html#setSize(int)">setSize</A></B>(int&nbsp;size)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/lowagie/text/pdf/ByteBuffer.html#size()">size</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the current size of the buffer.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;byte[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/lowagie/text/pdf/ByteBuffer.html#toByteArray()">toByteArray</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a newly allocated byte array.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/lowagie/text/pdf/ByteBuffer.html#toString()">toString</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts the buffer's contents into a string, translating bytes into characters according to the platform's default character encoding.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/lowagie/text/pdf/ByteBuffer.html#toString(java.lang.String)">toString</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;enc)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts the buffer's contents into a string, translating bytes into characters according to the specified character encoding.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/lowagie/text/pdf/ByteBuffer.html#write(byte[], int, int)">write</A></B>(byte[]&nbsp;b,      int&nbsp;off,      int&nbsp;len)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/lowagie/text/pdf/ByteBuffer.html#write(int)">write</A></B>(int&nbsp;b)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/lowagie/text/pdf/ByteBuffer.html#writeTo(java.io.OutputStream)">writeTo</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A>&nbsp;out)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes the complete contents of this byte buffer output to the specified output stream argument, as if by calling the output stream's write method using <code>out.write(buf, 0, count)</code>.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.io.OutputStream"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class java.io.<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/OutputStream.html?is-external=true#close()" title="class or interface in java.io">close</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/OutputStream.html?is-external=true#flush()" title="class or interface in java.io">flush</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/OutputStream.html?is-external=true#write(byte[])" title="class or interface in java.io">write</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Field Detail</B></FONT></TH></TR></TABLE><A NAME="count"><!-- --></A><H3>count</H3><PRE>protected int <B>count</B></PRE><DL><DD>The count of bytes in the buffer.<P><DL></DL></DL><HR><A NAME="buf"><!-- --></A><H3>buf</H3><PRE>protected byte[] <B>buf</B></PRE><DL><DD>The buffer where the bytes are stored.<P><DL></DL></DL><HR><A NAME="byteCacheSize"><!-- --></A><H3>byteCacheSize</H3><PRE>private static int <B>byteCacheSize</B></PRE><DL><DL></DL></DL><HR><A NAME="byteCache"><!-- --></A><H3>byteCache</H3><PRE>private static byte[][] <B>byteCache</B></PRE><DL><DL></DL></DL><HR><A NAME="ZERO"><!-- --></A><H3>ZERO</H3><PRE>public static final byte <B>ZERO</B></PRE><DL><DL><DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.lowagie.text.pdf.ByteBuffer.ZERO">Constant Field Values</A></DL></DL><HR><A NAME="chars"><!-- --></A><H3>chars</H3><PRE>private static final char[] <B>chars</B></PRE><DL><DL></DL></DL><HR><A NAME="bytes"><!-- --></A><H3>bytes</H3><PRE>private static final byte[] <B>bytes</B></PRE><DL><DL></DL></DL><HR><A NAME="HIGH_PRECISION"><!-- --></A><H3>HIGH_PRECISION</H3><PRE>public static boolean <B>HIGH_PRECISION</B></PRE><DL><DD>If <CODE>true</CODE> always output floating point numbers with 6 decimal digits. If <CODE>false</CODE> uses the faster, although less precise, representation.<P><DL></DL></DL><HR><A NAME="dfs"><!-- --></A><H3>dfs</H3><PRE>private static final <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/text/DecimalFormatSymbols.html?is-external=true" title="class or interface in java.text">DecimalFormatSymbols</A> <B>dfs</B></PRE><DL><DL></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="ByteBuffer()"><!-- --></A><H3>ByteBuffer</H3><PRE>public <B>ByteBuffer</B>()</PRE><DL><DD>Creates new ByteBuffer with capacity 128<P></DL><HR><A NAME="ByteBuffer(int)"><!-- --></A><H3>ByteBuffer</H3><PRE>public <B>ByteBuffer</B>(int&nbsp;size)</PRE><DL><DD>Creates a byte buffer with a certain capacity.<P><DL><DT><B>Parameters:</B><DD><CODE>size</CODE> - the initial capacity</DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="setCacheSize(int)"><!-- --></A><H3>setCacheSize</H3><PRE>public static void <B>setCacheSize</B>(int&nbsp;size)</PRE><DL><DD>Sets the cache size. <P> This can only be used to increment the size. If the size that is passed through is smaller than the current size, nothing happens.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>size</CODE> - the size of the cache</DL></DD></DL><HR><A NAME="fillCache(int)"><!-- --></A><H3>fillCache</H3><PRE>public static void <B>fillCache</B>(int&nbsp;decimals)</PRE><DL><DD>You can fill the cache in advance if you want to.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>decimals</CODE> - </DL></DD></DL><HR><A NAME="convertToBytes(int)"><!-- --></A><H3>convertToBytes</H3><PRE>private static byte[] <B>convertToBytes</B>(int&nbsp;i)</PRE><DL><DD>Converts an double (multiplied by 100 and cast to an int) into an array of bytes.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>i</CODE> - the int<DT><B>Returns:</B><DD>a byte array</DL></DD></DL><HR><A NAME="append_i(int)"><!-- --></A><H3>append_i</H3><PRE>public <A HREF="../../../../com/lowagie/text/pdf/ByteBuffer.html" title="class in com.lowagie.text.pdf">ByteBuffer</A> <B>append_i</B>(int&nbsp;b)</PRE><DL><DD>Appends an <CODE>int</CODE>. The size of the array will grow by one.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>b</CODE> - the int to be appended<DT><B>Returns:</B><DD>a reference to this <CODE>ByteBuffer</CODE> object</DL></DD></DL><HR><A NAME="append(byte[], int, int)"><!-- --></A><H3>append</H3><PRE>public <A HREF="../../../../com/lowagie/text/pdf/ByteBuffer.html" title="class in com.lowagie.text.pdf">ByteBuffer</A> <B>append</B>(byte[]&nbsp;b,                         int&nbsp;off,                         int&nbsp;len)</PRE><DL><DD>Appends the subarray of the <CODE>byte</CODE> array. The buffer will grow by <CODE>len</CODE> bytes.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>b</CODE> - the array to be appended<DD><CODE>off</CODE> - the offset to the start of the array<DD><CODE>len</CODE> - the length of bytes to append<DT><B>Returns:</B><DD>a reference to this <CODE>ByteBuffer</CODE> object</DL></DD></DL><HR><A NAME="append(byte[])"><!-- --></A><H3>append</H3><PRE>public <A HREF="../../../../com/lowagie/text/pdf/ByteBuffer.html" title="class in com.lowagie.text.pdf">ByteBuffer</A> <B>append</B>(byte[]&nbsp;b)</PRE><DL><DD>Appends an array of bytes.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>b</CODE> - the array to be appended<DT><B>Returns:</B><DD>a reference to this <CODE>ByteBuffer</CODE> object</DL></DD></DL><HR><A NAME="append(java.lang.String)"><!-- --></A><H3>append</H3>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -