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

📄 bytebuffer.html

📁 java编程java编程java编程java编程java编程java编程java编程
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;You can fill the cache in advance if you want to.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/lowagie/text/pdf/ByteBuffer.html#formatDouble(double)">formatDouble</A></B>(double&nbsp;d)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Outputs a <CODE>double</CODE> into a format suitable for the PDF.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/lowagie/text/pdf/ByteBuffer.html#formatDouble(double, com.lowagie.text.pdf.ByteBuffer)">formatDouble</A></B>(double&nbsp;d,             <A HREF="../../../../com/lowagie/text/pdf/ByteBuffer.html">ByteBuffer</A>&nbsp;buf)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Outputs a <CODE>double</CODE> into a format suitable for the PDF.</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;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.3/docs/api/java/lang/String.html">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.3/docs/api/java/lang/String.html">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.3/docs/api/java/lang/String.html">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#writeTo(java.io.OutputStream)">writeTo</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/OutputStream.html">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.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#clone()">clone</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#finalize()">finalize</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#getClass()">getClass</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notify()">notify</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait()">wait</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait(long)">wait</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait(long, int)">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</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 byte <B>ZERO</B></PRE>
<DL>
<DL>
</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>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</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>
<DT><B>Parameters:</B><DD><CODE>size</CODE> - the initial capacity</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</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 bytearray</DL>
</DD>
</DL>
<HR>

<A NAME="append_i(int)"><!-- --></A><H3>
append_i</H3>
<PRE>
public <A HREF="../../../../com/lowagie/text/pdf/ByteBuffer.html">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">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">ByteBuffer</A> <B>append</B>(byte[]&nbsp;b)</PRE>
<DL>

⌨️ 快捷键说明

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