svn-gvsig-desktop / trunk / libraries / libDwg / doc / javadoc / com / iver / cit / gvsig / fmap / drivers / dgn / ByteUtils.html @ 2896
History | View | Annotate | Download (48.8 KB)
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
---|---|
2 |
<!--NewPage-->
|
3 |
<HTML>
|
4 |
<HEAD>
|
5 |
<!-- Generated by javadoc (build 1.4.2_08) on Wed Sep 07 16:36:35 CEST 2005 -->
|
6 |
<TITLE>
|
7 |
ByteUtils |
8 |
</TITLE>
|
9 |
|
10 |
<META NAME="keywords" CONTENT="com.iver.cit.gvsig.fmap.drivers.dgn.ByteUtils class"> |
11 |
|
12 |
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../../stylesheet.css" TITLE="Style"> |
13 |
|
14 |
<SCRIPT type="text/javascript"> |
15 |
function windowTitle() |
16 |
{ |
17 |
parent.document.title="ByteUtils"; |
18 |
} |
19 |
</SCRIPT>
|
20 |
|
21 |
</HEAD>
|
22 |
|
23 |
<BODY BGCOLOR="white" onload="windowTitle();"> |
24 |
|
25 |
|
26 |
<!-- ========= START OF TOP NAVBAR ======= -->
|
27 |
<A NAME="navbar_top"><!-- --></A> |
28 |
<A HREF="#skip-navbar_top" title="Skip navigation links"></A> |
29 |
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
30 |
<TR>
|
31 |
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
32 |
<A NAME="navbar_top_firstrow"><!-- --></A> |
33 |
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
34 |
<TR ALIGN="center" VALIGN="top"> |
35 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
36 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
37 |
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
38 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ByteUtils.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
39 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
40 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
41 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
42 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
43 |
</TR>
|
44 |
</TABLE>
|
45 |
</TD>
|
46 |
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
47 |
</EM>
|
48 |
</TD>
|
49 |
</TR>
|
50 |
|
51 |
<TR>
|
52 |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
53 |
PREV CLASS |
54 |
NEXT CLASS</FONT></TD> |
55 |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
56 |
<A HREF="../../../../../../../index.html" target="_top"><B>FRAMES</B></A> |
57 |
<A HREF="ByteUtils.html" target="_top"><B>NO FRAMES</B></A> |
58 |
<SCRIPT type="text/javascript"> |
59 |
<!--
|
60 |
if(window==top) {
|
61 |
document.writeln('<A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
62 |
}
|
63 |
//-->
|
64 |
</SCRIPT>
|
65 |
<NOSCRIPT>
|
66 |
<A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A> |
67 |
</NOSCRIPT>
|
68 |
|
69 |
</FONT></TD> |
70 |
</TR>
|
71 |
<TR>
|
72 |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
73 |
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
74 |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
75 |
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
76 |
</TR>
|
77 |
</TABLE>
|
78 |
<A NAME="skip-navbar_top"></A> |
79 |
<!-- ========= END OF TOP NAVBAR ========= -->
|
80 |
|
81 |
<HR>
|
82 |
<!-- ======== START OF CLASS DATA ======== -->
|
83 |
<H2>
|
84 |
<FONT SIZE="-1"> |
85 |
com.iver.cit.gvsig.fmap.drivers.dgn</FONT>
|
86 |
<BR>
|
87 |
Class ByteUtils</H2>
|
88 |
<PRE>
|
89 |
java.lang.Object |
90 |
<IMG SRC="../../../../../../../resources/inherit.gif" ALT="extended by"><B>com.iver.cit.gvsig.fmap.drivers.dgn.ByteUtils</B> |
91 |
</PRE>
|
92 |
<HR>
|
93 |
<DL>
|
94 |
<DT>public class <B>ByteUtils</B><DT>extends java.lang.Object</DL> |
95 |
|
96 |
<P>
|
97 |
Clase que engloba m?todos para trabajar con bytes. |
98 |
<P>
|
99 |
|
100 |
<P>
|
101 |
<DL>
|
102 |
<DT><B>Author:</B></DT> |
103 |
<DD>Vicente Caballero Navarro</DD> |
104 |
</DL>
|
105 |
<HR>
|
106 |
|
107 |
<P>
|
108 |
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
109 |
|
110 |
|
111 |
<!-- =========== FIELD SUMMARY =========== -->
|
112 |
|
113 |
<A NAME="field_summary"><!-- --></A> |
114 |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
115 |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
116 |
<TD COLSPAN=2><FONT SIZE="+2"> |
117 |
<B>Field Summary</B></FONT></TD> |
118 |
</TR>
|
119 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
120 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
121 |
<CODE>static char[]</CODE></FONT></TD> |
122 |
<TD><CODE><B><A HREF="../../../../../../../com/iver/cit/gvsig/fmap/drivers/dgn/ByteUtils.html#digits">digits</A></B></CODE> |
123 |
|
124 |
<BR>
|
125 |
A nibble->char mapping for printing out bytes.</TD> |
126 |
</TR>
|
127 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
128 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
129 |
<CODE>static int</CODE></FONT></TD> |
130 |
<TD><CODE><B><A HREF="../../../../../../../com/iver/cit/gvsig/fmap/drivers/dgn/ByteUtils.html#SIZE_BOOL">SIZE_BOOL</A></B></CODE> |
131 |
|
132 |
<BR>
|
133 |
</TD> |
134 |
</TR>
|
135 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
136 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
137 |
<CODE>static int</CODE></FONT></TD> |
138 |
<TD><CODE><B><A HREF="../../../../../../../com/iver/cit/gvsig/fmap/drivers/dgn/ByteUtils.html#SIZE_DOUBLE">SIZE_DOUBLE</A></B></CODE> |
139 |
|
140 |
<BR>
|
141 |
</TD> |
142 |
</TR>
|
143 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
144 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
145 |
<CODE>static int</CODE></FONT></TD> |
146 |
<TD><CODE><B><A HREF="../../../../../../../com/iver/cit/gvsig/fmap/drivers/dgn/ByteUtils.html#SIZE_INT">SIZE_INT</A></B></CODE> |
147 |
|
148 |
<BR>
|
149 |
</TD> |
150 |
</TR>
|
151 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
152 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
153 |
<CODE>static int</CODE></FONT></TD> |
154 |
<TD><CODE><B><A HREF="../../../../../../../com/iver/cit/gvsig/fmap/drivers/dgn/ByteUtils.html#SIZE_LONG">SIZE_LONG</A></B></CODE> |
155 |
|
156 |
<BR>
|
157 |
</TD> |
158 |
</TR>
|
159 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
160 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
161 |
<CODE>static int</CODE></FONT></TD> |
162 |
<TD><CODE><B><A HREF="../../../../../../../com/iver/cit/gvsig/fmap/drivers/dgn/ByteUtils.html#SIZE_SHORT">SIZE_SHORT</A></B></CODE> |
163 |
|
164 |
<BR>
|
165 |
</TD> |
166 |
</TR>
|
167 |
</TABLE>
|
168 |
|
169 |
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
170 |
|
171 |
<A NAME="constructor_summary"><!-- --></A> |
172 |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
173 |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
174 |
<TD COLSPAN=2><FONT SIZE="+2"> |
175 |
<B>Constructor Summary</B></FONT></TD> |
176 |
</TR>
|
177 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
178 |
<TD><CODE><B><A HREF="../../../../../../../com/iver/cit/gvsig/fmap/drivers/dgn/ByteUtils.html#ByteUtils()">ByteUtils</A></B>()</CODE> |
179 |
|
180 |
<BR>
|
181 |
</TD> |
182 |
</TR>
|
183 |
</TABLE>
|
184 |
|
185 |
<!-- ========== METHOD SUMMARY =========== -->
|
186 |
|
187 |
<A NAME="method_summary"><!-- --></A> |
188 |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
189 |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
190 |
<TD COLSPAN=2><FONT SIZE="+2"> |
191 |
<B>Method Summary</B></FONT></TD> |
192 |
</TR>
|
193 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
194 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
195 |
<CODE>static void</CODE></FONT></TD> |
196 |
<TD><CODE><B><A HREF="../../../../../../../com/iver/cit/gvsig/fmap/drivers/dgn/ByteUtils.html#bigIntegerToBytes(java.math.BigInteger, byte[], int[])">bigIntegerToBytes</A></B>(java.math.BigInteger n, |
197 |
byte[] data,
|
198 |
int[] offset)</CODE> |
199 |
|
200 |
<BR>
|
201 |
Write the bytes representing <code>n</code> into the byte array |
202 |
<code>data</code>, starting at index <code>offset [0]</code>, and |
203 |
increment <code>offset [0]</code> by the number of bytes written; if |
204 |
<code>data == null</code>, increment <code>offset [0]</code> by the |
205 |
number of bytes that would have been written otherwise.</TD>
|
206 |
</TR>
|
207 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
208 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
209 |
<CODE>static void</CODE></FONT></TD> |
210 |
<TD><CODE><B><A HREF="../../../../../../../com/iver/cit/gvsig/fmap/drivers/dgn/ByteUtils.html#boolToBytes(boolean, byte[], int[])">boolToBytes</A></B>(boolean b, |
211 |
byte[] data,
|
212 |
int[] offset)</CODE> |
213 |
|
214 |
<BR>
|
215 |
Write the bytes representing <code>b</code> into the byte array |
216 |
<code>data</code>, starting at index <code>offset [0]</code>, and |
217 |
increment <code>offset [0]</code> by the number of bytes written; if |
218 |
<code>data == null</code>, increment <code>offset [0]</code> by the |
219 |
number of bytes that would have been written otherwise.</TD>
|
220 |
</TR>
|
221 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
222 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
223 |
<CODE>static java.math.BigInteger</CODE></FONT></TD> |
224 |
<TD><CODE><B><A HREF="../../../../../../../com/iver/cit/gvsig/fmap/drivers/dgn/ByteUtils.html#bytesToBigInteger(byte[], int[])">bytesToBigInteger</A></B>(byte[] data, |
225 |
int[] offset)</CODE> |
226 |
|
227 |
<BR>
|
228 |
Return the <code>BigInteger</code> represented by the bytes in |
229 |
<code>data</code> staring at offset <code>offset[0]</code>.</TD> |
230 |
</TR>
|
231 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
232 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
233 |
<CODE>static boolean</CODE></FONT></TD> |
234 |
<TD><CODE><B><A HREF="../../../../../../../com/iver/cit/gvsig/fmap/drivers/dgn/ByteUtils.html#bytesToBool(byte[], int[])">bytesToBool</A></B>(byte[] data, |
235 |
int[] offset)</CODE> |
236 |
|
237 |
<BR>
|
238 |
Return the <code>boolean</code> represented by the bytes in |
239 |
<code>data</code> staring at offset <code>offset[0]</code>.</TD> |
240 |
</TR>
|
241 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
242 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
243 |
<CODE>static double</CODE></FONT></TD> |
244 |
<TD><CODE><B><A HREF="../../../../../../../com/iver/cit/gvsig/fmap/drivers/dgn/ByteUtils.html#bytesToDouble(byte[], int[])">bytesToDouble</A></B>(byte[] data, |
245 |
int[] offset)</CODE> |
246 |
|
247 |
<BR>
|
248 |
Return the <code>double</code> represented by the bytes in |
249 |
<code>data</code> staring at offset <code>offset[0]</code>.</TD> |
250 |
</TR>
|
251 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
252 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
253 |
<CODE>static int</CODE></FONT></TD> |
254 |
<TD><CODE><B><A HREF="../../../../../../../com/iver/cit/gvsig/fmap/drivers/dgn/ByteUtils.html#bytesToInt(byte[], int[])">bytesToInt</A></B>(byte[] data, |
255 |
int[] offset)</CODE> |
256 |
|
257 |
<BR>
|
258 |
Return the <code>int</code> represented by the bytes in |
259 |
<code>data</code> staring at offset <code>offset[0]</code>.</TD> |
260 |
</TR>
|
261 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
262 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
263 |
<CODE>static void</CODE></FONT></TD> |
264 |
<TD><CODE><B><A HREF="../../../../../../../com/iver/cit/gvsig/fmap/drivers/dgn/ByteUtils.html#bytesToInts(int[], int, byte[], int, int)">bytesToInts</A></B>(int[] dst, |
265 |
int dst_offset,
|
266 |
byte[] src,
|
267 |
int src_offset,
|
268 |
int length)</CODE> |
269 |
|
270 |
<BR>
|
271 |
Convert an array of <code>bytes</code>s into an array of |
272 |
<code>ints</code>.</TD> |
273 |
</TR>
|
274 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
275 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
276 |
<CODE>static long</CODE></FONT></TD> |
277 |
<TD><CODE><B><A HREF="../../../../../../../com/iver/cit/gvsig/fmap/drivers/dgn/ByteUtils.html#bytesToLong(byte[], int[])">bytesToLong</A></B>(byte[] data, |
278 |
int[] offset)</CODE> |
279 |
|
280 |
<BR>
|
281 |
Return the <code>long</code> represented by the bytes in |
282 |
<code>data</code> staring at offset <code>offset[0]</code>.</TD> |
283 |
</TR>
|
284 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
285 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
286 |
<CODE>static short</CODE></FONT></TD> |
287 |
<TD><CODE><B><A HREF="../../../../../../../com/iver/cit/gvsig/fmap/drivers/dgn/ByteUtils.html#bytesToShort(byte[], int[])">bytesToShort</A></B>(byte[] data, |
288 |
int[] offset)</CODE> |
289 |
|
290 |
<BR>
|
291 |
Return the <code>short</code> represented by the bytes in |
292 |
<code>data</code> staring at offset <code>offset[0]</code>.</TD> |
293 |
</TR>
|
294 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
295 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
296 |
<CODE>static java.lang.String</CODE></FONT></TD> |
297 |
<TD><CODE><B><A HREF="../../../../../../../com/iver/cit/gvsig/fmap/drivers/dgn/ByteUtils.html#bytesToString(byte[], int[])">bytesToString</A></B>(byte[] data, |
298 |
int[] offset)</CODE> |
299 |
|
300 |
<BR>
|
301 |
Return the <code>String</code> represented by the bytes in |
302 |
<code>data</code> staring at offset <code>offset[0]</code>. </TD> |
303 |
</TR>
|
304 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
305 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
306 |
<CODE>static int</CODE></FONT></TD> |
307 |
<TD><CODE><B><A HREF="../../../../../../../com/iver/cit/gvsig/fmap/drivers/dgn/ByteUtils.html#byteToUnsignedInt(byte)">byteToUnsignedInt</A></B>(byte b)</CODE> |
308 |
|
309 |
<BR>
|
310 |
Convert a <code>byte</code> into an unsigned integer.</TD> |
311 |
</TR>
|
312 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
313 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
314 |
<CODE>static void</CODE></FONT></TD> |
315 |
<TD><CODE><B><A HREF="../../../../../../../com/iver/cit/gvsig/fmap/drivers/dgn/ByteUtils.html#doubleToBytes(double, byte[], int[])">doubleToBytes</A></B>(double d, |
316 |
byte[] data,
|
317 |
int[] offset)</CODE> |
318 |
|
319 |
<BR>
|
320 |
Write the bytes representing <code>d</code> into the byte array |
321 |
<code>data</code>, starting at index <code>offset [0]</code>, and |
322 |
increment <code>offset [0]</code> by the number of bytes written; if |
323 |
<code>data == null</code>, increment <code>offset [0]</code> by the |
324 |
number of bytes that would have been written otherwise.</TD>
|
325 |
</TR>
|
326 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
327 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
328 |
<CODE>static boolean</CODE></FONT></TD> |
329 |
<TD><CODE><B><A HREF="../../../../../../../com/iver/cit/gvsig/fmap/drivers/dgn/ByteUtils.html#equals(byte[], byte[])">equals</A></B>(byte[] b1, |
330 |
byte[] b2)</CODE> |
331 |
|
332 |
<BR>
|
333 |
Determines whether two arrays of <code>byte</code>s contain the same |
334 |
contents.</TD>
|
335 |
</TR>
|
336 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
337 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
338 |
<CODE>static int</CODE></FONT></TD> |
339 |
<TD><CODE><B><A HREF="../../../../../../../com/iver/cit/gvsig/fmap/drivers/dgn/ByteUtils.html#getUnsigned(byte)">getUnsigned</A></B>(byte b)</CODE> |
340 |
|
341 |
<BR>
|
342 |
DOCUMENT ME!</TD> |
343 |
</TR>
|
344 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
345 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
346 |
<CODE>static void</CODE></FONT></TD> |
347 |
<TD><CODE><B><A HREF="../../../../../../../com/iver/cit/gvsig/fmap/drivers/dgn/ByteUtils.html#intsToBytes(byte[], int, int[], int, int)">intsToBytes</A></B>(byte[] dst, |
348 |
int dst_offset,
|
349 |
int[] src,
|
350 |
int src_offset,
|
351 |
int length)</CODE> |
352 |
|
353 |
<BR>
|
354 |
Convert an array of <code>int</code>s into an array of |
355 |
<code>bytes</code>.</TD> |
356 |
</TR>
|
357 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
358 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
359 |
<CODE>static void</CODE></FONT></TD> |
360 |
<TD><CODE><B><A HREF="../../../../../../../com/iver/cit/gvsig/fmap/drivers/dgn/ByteUtils.html#intToBytes(int, byte[], int[])">intToBytes</A></B>(int i, |
361 |
byte[] data,
|
362 |
int[] offset)</CODE> |
363 |
|
364 |
<BR>
|
365 |
Write the bytes representing <code>i</code> into the byte array |
366 |
<code>data</code>, starting at index <code>offset [0]</code>, and |
367 |
increment <code>offset [0]</code> by the number of bytes written; if |
368 |
<code>data == null</code>, increment <code>offset [0]</code> by the |
369 |
number of bytes that would have been written otherwise.</TD>
|
370 |
</TR>
|
371 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
372 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
373 |
<CODE>static void</CODE></FONT></TD> |
374 |
<TD><CODE><B><A HREF="../../../../../../../com/iver/cit/gvsig/fmap/drivers/dgn/ByteUtils.html#longToBytes(long, byte[], int[])">longToBytes</A></B>(long l, |
375 |
byte[] data,
|
376 |
int[] offset)</CODE> |
377 |
|
378 |
<BR>
|
379 |
Write the bytes representing <code>l</code> into the byte array |
380 |
<code>data</code>, starting at index <code>offset [0]</code>, and |
381 |
increment <code>offset [0]</code> by the number of bytes written; if |
382 |
<code>data == null</code>, increment <code>offset [0]</code> by the |
383 |
number of bytes that would have been written otherwise.</TD>
|
384 |
</TR>
|
385 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
386 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
387 |
<CODE>static void</CODE></FONT></TD> |
388 |
<TD><CODE><B><A HREF="../../../../../../../com/iver/cit/gvsig/fmap/drivers/dgn/ByteUtils.html#memclr(byte[], int, int)">memclr</A></B>(byte[] array, |
389 |
int offset,
|
390 |
int length)</CODE> |
391 |
|
392 |
<BR>
|
393 |
Fill the given array with zeros.</TD> |
394 |
</TR>
|
395 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
396 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
397 |
<CODE>static boolean</CODE></FONT></TD> |
398 |
<TD><CODE><B><A HREF="../../../../../../../com/iver/cit/gvsig/fmap/drivers/dgn/ByteUtils.html#memcmp(byte[], int, byte[], int, int)">memcmp</A></B>(byte[] a, |
399 |
int a_offset,
|
400 |
byte[] b,
|
401 |
int b_offset,
|
402 |
int length)</CODE> |
403 |
|
404 |
<BR>
|
405 |
Compare the contents of one array of <code>bytes</code> to another.</TD> |
406 |
</TR>
|
407 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
408 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
409 |
<CODE>static int</CODE></FONT></TD> |
410 |
<TD><CODE><B><A HREF="../../../../../../../com/iver/cit/gvsig/fmap/drivers/dgn/ByteUtils.html#memcpy(byte[], int, byte[], int, int)">memcpy</A></B>(byte[] dst, |
411 |
int dst_offset,
|
412 |
byte[] src,
|
413 |
int src_offset,
|
414 |
int length)</CODE> |
415 |
|
416 |
<BR>
|
417 |
Copy contents of one array of <code>bytes</code> into another. </TD> |
418 |
</TR>
|
419 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
420 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
421 |
<CODE>static java.lang.String</CODE></FONT></TD> |
422 |
<TD><CODE><B><A HREF="../../../../../../../com/iver/cit/gvsig/fmap/drivers/dgn/ByteUtils.html#print_bytes_exact(byte[], int, int)">print_bytes_exact</A></B>(byte[] data, |
423 |
int offset,
|
424 |
int length)</CODE> |
425 |
|
426 |
<BR>
|
427 |
DOCUMENT ME!</TD> |
428 |
</TR>
|
429 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
430 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
431 |
<CODE>static java.lang.String</CODE></FONT></TD> |
432 |
<TD><CODE><B><A HREF="../../../../../../../com/iver/cit/gvsig/fmap/drivers/dgn/ByteUtils.html#print_bytes(byte[])">print_bytes</A></B>(byte[] data)</CODE> |
433 |
|
434 |
<BR>
|
435 |
DOCUMENT ME!</TD> |
436 |
</TR>
|
437 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
438 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
439 |
<CODE>static java.lang.String</CODE></FONT></TD> |
440 |
<TD><CODE><B><A HREF="../../../../../../../com/iver/cit/gvsig/fmap/drivers/dgn/ByteUtils.html#print_bytes(byte[], int, int)">print_bytes</A></B>(byte[] data, |
441 |
int offset,
|
442 |
int length)</CODE> |
443 |
|
444 |
<BR>
|
445 |
Produce a <code>String</code> representation for the specified array of |
446 |
<code>byte</code>s. </TD> |
447 |
</TR>
|
448 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
449 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
450 |
<CODE>static int</CODE></FONT></TD> |
451 |
<TD><CODE><B><A HREF="../../../../../../../com/iver/cit/gvsig/fmap/drivers/dgn/ByteUtils.html#round_up(int, int)">round_up</A></B>(int value, |
452 |
int multiple)</CODE> |
453 |
|
454 |
<BR>
|
455 |
Round a number up to a given multiple.</TD> |
456 |
</TR>
|
457 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
458 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
459 |
<CODE>static void</CODE></FONT></TD> |
460 |
<TD><CODE><B><A HREF="../../../../../../../com/iver/cit/gvsig/fmap/drivers/dgn/ByteUtils.html#shortToBytes(short, byte[], int[])">shortToBytes</A></B>(short s, |
461 |
byte[] data,
|
462 |
int[] offset)</CODE> |
463 |
|
464 |
<BR>
|
465 |
Write the bytes representing <code>s</code> into the byte array |
466 |
<code>data</code>, starting at index <code>offset [0]</code>, and |
467 |
increment <code>offset [0]</code> by the number of bytes written; if |
468 |
<code>data == null</code>, increment <code>offset [0]</code> by the |
469 |
number of bytes that would have been written otherwise.</TD>
|
470 |
</TR>
|
471 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
472 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
473 |
<CODE>static void</CODE></FONT></TD> |
474 |
<TD><CODE><B><A HREF="../../../../../../../com/iver/cit/gvsig/fmap/drivers/dgn/ByteUtils.html#stringToBytes(java.lang.String, byte[], int[])">stringToBytes</A></B>(java.lang.String s, |
475 |
byte[] data,
|
476 |
int[] offset)</CODE> |
477 |
|
478 |
<BR>
|
479 |
Write the bytes representing <code>s</code> into the byte array |
480 |
<code>data</code>, starting at index <code>offset [0]</code>, and |
481 |
increment <code>offset [0]</code> by the number of bytes written; if |
482 |
<code>data == null</code>, increment <code>offset [0]</code> by the |
483 |
number of bytes that would have been written otherwise.</TD>
|
484 |
</TR>
|
485 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
486 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
487 |
<CODE>static byte[]</CODE></FONT></TD> |
488 |
<TD><CODE><B><A HREF="../../../../../../../com/iver/cit/gvsig/fmap/drivers/dgn/ByteUtils.html#zero_pad(byte[], int)">zero_pad</A></B>(byte[] original, |
489 |
int block_size)</CODE> |
490 |
|
491 |
<BR>
|
492 |
Return a new array equal to original except zero-padded to an integral |
493 |
mulitple of blocks. </TD>
|
494 |
</TR>
|
495 |
</TABLE>
|
496 |
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> |
497 |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
498 |
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
499 |
<TD><B>Methods inherited from class java.lang.Object</B></TD> |
500 |
</TR>
|
501 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
502 |
<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> |
503 |
</TR>
|
504 |
</TABLE>
|
505 |
|
506 |
<P>
|
507 |
|
508 |
<!-- ============ FIELD DETAIL =========== -->
|
509 |
|
510 |
<A NAME="field_detail"><!-- --></A> |
511 |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
512 |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
513 |
<TD COLSPAN=1><FONT SIZE="+2"> |
514 |
<B>Field Detail</B></FONT></TD> |
515 |
</TR>
|
516 |
</TABLE>
|
517 |
|
518 |
<A NAME="SIZE_BOOL"><!-- --></A><H3> |
519 |
SIZE_BOOL</H3>
|
520 |
<PRE>
|
521 |
public static final int <B>SIZE_BOOL</B></PRE> |
522 |
<DL>
|
523 |
<DL>
|
524 |
<DT><B>See Also:</B><DD><A HREF="../../../../../../../constant-values.html#com.iver.cit.gvsig.fmap.drivers.dgn.ByteUtils.SIZE_BOOL">Constant Field Values</A></DL> |
525 |
</DL>
|
526 |
<HR>
|
527 |
|
528 |
<A NAME="SIZE_SHORT"><!-- --></A><H3> |
529 |
SIZE_SHORT</H3>
|
530 |
<PRE>
|
531 |
public static final int <B>SIZE_SHORT</B></PRE> |
532 |
<DL>
|
533 |
<DL>
|
534 |
<DT><B>See Also:</B><DD><A HREF="../../../../../../../constant-values.html#com.iver.cit.gvsig.fmap.drivers.dgn.ByteUtils.SIZE_SHORT">Constant Field Values</A></DL> |
535 |
</DL>
|
536 |
<HR>
|
537 |
|
538 |
<A NAME="SIZE_INT"><!-- --></A><H3> |
539 |
SIZE_INT</H3>
|
540 |
<PRE>
|
541 |
public static final int <B>SIZE_INT</B></PRE> |
542 |
<DL>
|
543 |
<DL>
|
544 |
<DT><B>See Also:</B><DD><A HREF="../../../../../../../constant-values.html#com.iver.cit.gvsig.fmap.drivers.dgn.ByteUtils.SIZE_INT">Constant Field Values</A></DL> |
545 |
</DL>
|
546 |
<HR>
|
547 |
|
548 |
<A NAME="SIZE_LONG"><!-- --></A><H3> |
549 |
SIZE_LONG</H3>
|
550 |
<PRE>
|
551 |
public static final int <B>SIZE_LONG</B></PRE> |
552 |
<DL>
|
553 |
<DL>
|
554 |
<DT><B>See Also:</B><DD><A HREF="../../../../../../../constant-values.html#com.iver.cit.gvsig.fmap.drivers.dgn.ByteUtils.SIZE_LONG">Constant Field Values</A></DL> |
555 |
</DL>
|
556 |
<HR>
|
557 |
|
558 |
<A NAME="SIZE_DOUBLE"><!-- --></A><H3> |
559 |
SIZE_DOUBLE</H3>
|
560 |
<PRE>
|
561 |
public static final int <B>SIZE_DOUBLE</B></PRE> |
562 |
<DL>
|
563 |
<DL>
|
564 |
<DT><B>See Also:</B><DD><A HREF="../../../../../../../constant-values.html#com.iver.cit.gvsig.fmap.drivers.dgn.ByteUtils.SIZE_DOUBLE">Constant Field Values</A></DL> |
565 |
</DL>
|
566 |
<HR>
|
567 |
|
568 |
<A NAME="digits"><!-- --></A><H3> |
569 |
digits</H3>
|
570 |
<PRE>
|
571 |
public static final char[] <B>digits</B></PRE> |
572 |
<DL>
|
573 |
<DD>A nibble->char mapping for printing out bytes. |
574 |
<P>
|
575 |
<DL>
|
576 |
</DL>
|
577 |
</DL>
|
578 |
|
579 |
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
580 |
|
581 |
<A NAME="constructor_detail"><!-- --></A> |
582 |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
583 |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
584 |
<TD COLSPAN=1><FONT SIZE="+2"> |
585 |
<B>Constructor Detail</B></FONT></TD> |
586 |
</TR>
|
587 |
</TABLE>
|
588 |
|
589 |
<A NAME="ByteUtils()"><!-- --></A><H3> |
590 |
ByteUtils</H3>
|
591 |
<PRE>
|
592 |
public <B>ByteUtils</B>()</PRE> |
593 |
<DL>
|
594 |
</DL>
|
595 |
|
596 |
<!-- ============ METHOD DETAIL ========== -->
|
597 |
|
598 |
<A NAME="method_detail"><!-- --></A> |
599 |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
600 |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
601 |
<TD COLSPAN=1><FONT SIZE="+2"> |
602 |
<B>Method Detail</B></FONT></TD> |
603 |
</TR>
|
604 |
</TABLE>
|
605 |
|
606 |
<A NAME="bytesToInt(byte[], int[])"><!-- --></A><H3> |
607 |
bytesToInt</H3>
|
608 |
<PRE>
|
609 |
public static final int <B>bytesToInt</B>(byte[] data, |
610 |
int[] offset)</PRE> |
611 |
<DL>
|
612 |
<DD>Return the <code>int</code> represented by the bytes in |
613 |
<code>data</code> staring at offset <code>offset[0]</code>. |
614 |
<P>
|
615 |
<DD><DL> |
616 |
<DT><B>Parameters:</B><DD><CODE>data</CODE> - the array from which to read<DD><CODE>offset</CODE> - A single element array whose first element is the index in |
617 |
data from which to begin reading on function entry, and which on |
618 |
function exit has been incremented by the number of bytes read. |
619 |
<DT><B>Returns:</B><DD>the value of the <code>int</code> decoded</DL> |
620 |
</DD>
|
621 |
</DL>
|
622 |
<HR>
|
623 |
|
624 |
<A NAME="intToBytes(int, byte[], int[])"><!-- --></A><H3> |
625 |
intToBytes</H3>
|
626 |
<PRE>
|
627 |
public static final void <B>intToBytes</B>(int i, |
628 |
byte[] data,
|
629 |
int[] offset)</PRE> |
630 |
<DL>
|
631 |
<DD>Write the bytes representing <code>i</code> into the byte array |
632 |
<code>data</code>, starting at index <code>offset [0]</code>, and |
633 |
increment <code>offset [0]</code> by the number of bytes written; if |
634 |
<code>data == null</code>, increment <code>offset [0]</code> by the |
635 |
number of bytes that would have been written otherwise. |
636 |
<P>
|
637 |
<DD><DL> |
638 |
<DT><B>Parameters:</B><DD><CODE>i</CODE> - the <code>int</code> to encode<DD><CODE>data</CODE> - The byte array to store into, or <code>null</code>.<DD><CODE>offset</CODE> - A single element array whose first element is the index in |
639 |
data to begin writing at on function entry, and which on |
640 |
function exit has been incremented by the number of bytes |
641 |
written.</DL>
|
642 |
</DD>
|
643 |
</DL>
|
644 |
<HR>
|
645 |
|
646 |
<A NAME="bytesToShort(byte[], int[])"><!-- --></A><H3> |
647 |
bytesToShort</H3>
|
648 |
<PRE>
|
649 |
public static final short <B>bytesToShort</B>(byte[] data, |
650 |
int[] offset)</PRE> |
651 |
<DL>
|
652 |
<DD>Return the <code>short</code> represented by the bytes in |
653 |
<code>data</code> staring at offset <code>offset[0]</code>. |
654 |
<P>
|
655 |
<DD><DL> |
656 |
<DT><B>Parameters:</B><DD><CODE>data</CODE> - the array from which to read<DD><CODE>offset</CODE> - A single element array whose first element is the index in |
657 |
data from which to begin reading on function entry, and which on |
658 |
function exit has been incremented by the number of bytes read. |
659 |
<DT><B>Returns:</B><DD>the value of the <code>short</code> decoded</DL> |
660 |
</DD>
|
661 |
</DL>
|
662 |
<HR>
|
663 |
|
664 |
<A NAME="shortToBytes(short, byte[], int[])"><!-- --></A><H3> |
665 |
shortToBytes</H3>
|
666 |
<PRE>
|
667 |
public static final void <B>shortToBytes</B>(short s, |
668 |
byte[] data,
|
669 |
int[] offset)</PRE> |
670 |
<DL>
|
671 |
<DD>Write the bytes representing <code>s</code> into the byte array |
672 |
<code>data</code>, starting at index <code>offset [0]</code>, and |
673 |
increment <code>offset [0]</code> by the number of bytes written; if |
674 |
<code>data == null</code>, increment <code>offset [0]</code> by the |
675 |
number of bytes that would have been written otherwise. |
676 |
<P>
|
677 |
<DD><DL> |
678 |
<DT><B>Parameters:</B><DD><CODE>s</CODE> - the <code>short</code> to encode<DD><CODE>data</CODE> - The byte array to store into, or <code>null</code>.<DD><CODE>offset</CODE> - A single element array whose first element is the index in |
679 |
data to begin writing at on function entry, and which on |
680 |
function exit has been incremented by the number of bytes |
681 |
written.</DL>
|
682 |
</DD>
|
683 |
</DL>
|
684 |
<HR>
|
685 |
|
686 |
<A NAME="bytesToLong(byte[], int[])"><!-- --></A><H3> |
687 |
bytesToLong</H3>
|
688 |
<PRE>
|
689 |
public static final long <B>bytesToLong</B>(byte[] data, |
690 |
int[] offset)</PRE> |
691 |
<DL>
|
692 |
<DD>Return the <code>long</code> represented by the bytes in |
693 |
<code>data</code> staring at offset <code>offset[0]</code>. |
694 |
<P>
|
695 |
<DD><DL> |
696 |
<DT><B>Parameters:</B><DD><CODE>data</CODE> - the array from which to read<DD><CODE>offset</CODE> - A single element array whose first element is the index in |
697 |
data from which to begin reading on function entry, and which |
698 |
on function exit has been incremented by the number of bytes |
699 |
read. |
700 |
<DT><B>Returns:</B><DD>the value of the <code>long</code> decoded</DL> |
701 |
</DD>
|
702 |
</DL>
|
703 |
<HR>
|
704 |
|
705 |
<A NAME="longToBytes(long, byte[], int[])"><!-- --></A><H3> |
706 |
longToBytes</H3>
|
707 |
<PRE>
|
708 |
public static final void <B>longToBytes</B>(long l, |
709 |
byte[] data,
|
710 |
int[] offset)</PRE> |
711 |
<DL>
|
712 |
<DD>Write the bytes representing <code>l</code> into the byte array |
713 |
<code>data</code>, starting at index <code>offset [0]</code>, and |
714 |
increment <code>offset [0]</code> by the number of bytes written; if |
715 |
<code>data == null</code>, increment <code>offset [0]</code> by the |
716 |
number of bytes that would have been written otherwise. |
717 |
<P>
|
718 |
<DD><DL> |
719 |
<DT><B>Parameters:</B><DD><CODE>l</CODE> - the <code>long</code> to encode<DD><CODE>data</CODE> - The byte array to store into, or <code>null</code>.<DD><CODE>offset</CODE> - A single element array whose first element is the index in |
720 |
data to begin writing at on function entry, and which on |
721 |
function exit has been incremented by the number of bytes |
722 |
written.</DL>
|
723 |
</DD>
|
724 |
</DL>
|
725 |
<HR>
|
726 |
|
727 |
<A NAME="bytesToDouble(byte[], int[])"><!-- --></A><H3> |
728 |
bytesToDouble</H3>
|
729 |
<PRE>
|
730 |
public static final double <B>bytesToDouble</B>(byte[] data, |
731 |
int[] offset)</PRE> |
732 |
<DL>
|
733 |
<DD>Return the <code>double</code> represented by the bytes in |
734 |
<code>data</code> staring at offset <code>offset[0]</code>. |
735 |
<P>
|
736 |
<DD><DL> |
737 |
<DT><B>Parameters:</B><DD><CODE>data</CODE> - the array from which to read<DD><CODE>offset</CODE> - A single element array whose first element is the index in |
738 |
data from which to begin reading on function entry, and which |
739 |
on function exit has been incremented by the number of bytes |
740 |
read. |
741 |
<DT><B>Returns:</B><DD>the value of the <code>double</code> decoded</DL> |
742 |
</DD>
|
743 |
</DL>
|
744 |
<HR>
|
745 |
|
746 |
<A NAME="doubleToBytes(double, byte[], int[])"><!-- --></A><H3> |
747 |
doubleToBytes</H3>
|
748 |
<PRE>
|
749 |
public static final void <B>doubleToBytes</B>(double d, |
750 |
byte[] data,
|
751 |
int[] offset)</PRE> |
752 |
<DL>
|
753 |
<DD>Write the bytes representing <code>d</code> into the byte array |
754 |
<code>data</code>, starting at index <code>offset [0]</code>, and |
755 |
increment <code>offset [0]</code> by the number of bytes written; if |
756 |
<code>data == null</code>, increment <code>offset [0]</code> by the |
757 |
number of bytes that would have been written otherwise. |
758 |
<P>
|
759 |
<DD><DL> |
760 |
<DT><B>Parameters:</B><DD><CODE>d</CODE> - the <code>double</code> to encode<DD><CODE>data</CODE> - The byte array to store into, or <code>null</code>.<DD><CODE>offset</CODE> - A single element array whose first element is the index in |
761 |
data to begin writing at on function entry, and which on |
762 |
function exit has been incremented by the number of bytes |
763 |
written.</DL>
|
764 |
</DD>
|
765 |
</DL>
|
766 |
<HR>
|
767 |
|
768 |
<A NAME="bytesToString(byte[], int[])"><!-- --></A><H3> |
769 |
bytesToString</H3>
|
770 |
<PRE>
|
771 |
public static final java.lang.String <B>bytesToString</B>(byte[] data, |
772 |
int[] offset)</PRE> |
773 |
<DL>
|
774 |
<DD>Return the <code>String</code> represented by the bytes in |
775 |
<code>data</code> staring at offset <code>offset[0]</code>. This method |
776 |
relies on the user using the corresponding <code>stringToBytes</code> |
777 |
method to encode the <code>String</code>, so that it may properly |
778 |
retrieve the <code>String</code> length. |
779 |
<P>
|
780 |
<DD><DL> |
781 |
<DT><B>Parameters:</B><DD><CODE>data</CODE> - the array from which to read<DD><CODE>offset</CODE> - A single element array whose first element is the index in |
782 |
data from which to begin reading on function entry, and which on |
783 |
function exit has been incremented by the number of bytes read. |
784 |
<DT><B>Returns:</B><DD>the value of the <code>String</code> decoded</DL> |
785 |
</DD>
|
786 |
</DL>
|
787 |
<HR>
|
788 |
|
789 |
<A NAME="stringToBytes(java.lang.String, byte[], int[])"><!-- --></A><H3> |
790 |
stringToBytes</H3>
|
791 |
<PRE>
|
792 |
public static final void <B>stringToBytes</B>(java.lang.String s, |
793 |
byte[] data,
|
794 |
int[] offset)</PRE> |
795 |
<DL>
|
796 |
<DD>Write the bytes representing <code>s</code> into the byte array |
797 |
<code>data</code>, starting at index <code>offset [0]</code>, and |
798 |
increment <code>offset [0]</code> by the number of bytes written; if |
799 |
<code>data == null</code>, increment <code>offset [0]</code> by the |
800 |
number of bytes that would have been written otherwise. |
801 |
<P>
|
802 |
<DD><DL> |
803 |
<DT><B>Parameters:</B><DD><CODE>s</CODE> - the <code>String</code> to encode<DD><CODE>data</CODE> - The byte array to store into, or <code>null</code>.<DD><CODE>offset</CODE> - A single element array whose first element is the index in |
804 |
data to begin writing at on function entry, and which on |
805 |
function exit has been incremented by the number of bytes |
806 |
written.</DL>
|
807 |
</DD>
|
808 |
</DL>
|
809 |
<HR>
|
810 |
|
811 |
<A NAME="bytesToBool(byte[], int[])"><!-- --></A><H3> |
812 |
bytesToBool</H3>
|
813 |
<PRE>
|
814 |
public static final boolean <B>bytesToBool</B>(byte[] data, |
815 |
int[] offset)</PRE> |
816 |
<DL>
|
817 |
<DD>Return the <code>boolean</code> represented by the bytes in |
818 |
<code>data</code> staring at offset <code>offset[0]</code>. |
819 |
<P>
|
820 |
<DD><DL> |
821 |
<DT><B>Parameters:</B><DD><CODE>data</CODE> - the array from which to read<DD><CODE>offset</CODE> - A single element array whose first element is the index in |
822 |
data from which to begin reading on function entry, and which |
823 |
on function exit has been incremented by the number of bytes |
824 |
read. |
825 |
<DT><B>Returns:</B><DD>the value of the <code>boolean</code> decoded</DL> |
826 |
</DD>
|
827 |
</DL>
|
828 |
<HR>
|
829 |
|
830 |
<A NAME="boolToBytes(boolean, byte[], int[])"><!-- --></A><H3> |
831 |
boolToBytes</H3>
|
832 |
<PRE>
|
833 |
public static final void <B>boolToBytes</B>(boolean b, |
834 |
byte[] data,
|
835 |
int[] offset)</PRE> |
836 |
<DL>
|
837 |
<DD>Write the bytes representing <code>b</code> into the byte array |
838 |
<code>data</code>, starting at index <code>offset [0]</code>, and |
839 |
increment <code>offset [0]</code> by the number of bytes written; if |
840 |
<code>data == null</code>, increment <code>offset [0]</code> by the |
841 |
number of bytes that would have been written otherwise. |
842 |
<P>
|
843 |
<DD><DL> |
844 |
<DT><B>Parameters:</B><DD><CODE>b</CODE> - the <code>boolean</code> to encode<DD><CODE>data</CODE> - The byte array to store into, or <code>null</code>.<DD><CODE>offset</CODE> - A single element array whose first element is the index in |
845 |
data to begin writing at on function entry, and which on |
846 |
function exit has been incremented by the number of bytes |
847 |
written.</DL>
|
848 |
</DD>
|
849 |
</DL>
|
850 |
<HR>
|
851 |
|
852 |
<A NAME="bytesToBigInteger(byte[], int[])"><!-- --></A><H3> |
853 |
bytesToBigInteger</H3>
|
854 |
<PRE>
|
855 |
public static final java.math.BigInteger <B>bytesToBigInteger</B>(byte[] data, |
856 |
int[] offset)</PRE> |
857 |
<DL>
|
858 |
<DD>Return the <code>BigInteger</code> represented by the bytes in |
859 |
<code>data</code> staring at offset <code>offset[0]</code>. |
860 |
<P>
|
861 |
<DD><DL> |
862 |
<DT><B>Parameters:</B><DD><CODE>data</CODE> - the array from which to read<DD><CODE>offset</CODE> - A single element array whose first element is the index in |
863 |
data from which to begin reading on function entry, and which |
864 |
on function exit has been incremented by the number of bytes |
865 |
read. |
866 |
<DT><B>Returns:</B><DD>the <code>BigInteger</code> decoded</DL> |
867 |
</DD>
|
868 |
</DL>
|
869 |
<HR>
|
870 |
|
871 |
<A NAME="bigIntegerToBytes(java.math.BigInteger, byte[], int[])"><!-- --></A><H3> |
872 |
bigIntegerToBytes</H3>
|
873 |
<PRE>
|
874 |
public static final void <B>bigIntegerToBytes</B>(java.math.BigInteger n, |
875 |
byte[] data,
|
876 |
int[] offset)</PRE> |
877 |
<DL>
|
878 |
<DD>Write the bytes representing <code>n</code> into the byte array |
879 |
<code>data</code>, starting at index <code>offset [0]</code>, and |
880 |
increment <code>offset [0]</code> by the number of bytes written; if |
881 |
<code>data == null</code>, increment <code>offset [0]</code> by the |
882 |
number of bytes that would have been written otherwise. |
883 |
<P>
|
884 |
<DD><DL> |
885 |
<DT><B>Parameters:</B><DD><CODE>n</CODE> - the <code>BigInteger</code> to encode<DD><CODE>data</CODE> - The byte array to store into, or <code>null</code>.<DD><CODE>offset</CODE> - A single element array whose first element is the index in |
886 |
data to begin writing at on function entry, and which on |
887 |
function exit has been incremented by the number of bytes |
888 |
written.</DL>
|
889 |
</DD>
|
890 |
</DL>
|
891 |
<HR>
|
892 |
|
893 |
<A NAME="bytesToInts(int[], int, byte[], int, int)"><!-- --></A><H3> |
894 |
bytesToInts</H3>
|
895 |
<PRE>
|
896 |
public static final void <B>bytesToInts</B>(int[] dst, |
897 |
int dst_offset,
|
898 |
byte[] src,
|
899 |
int src_offset,
|
900 |
int length)</PRE> |
901 |
<DL>
|
902 |
<DD>Convert an array of <code>bytes</code>s into an array of |
903 |
<code>ints</code>. |
904 |
<P>
|
905 |
<DD><DL> |
906 |
<DT><B>Parameters:</B><DD><CODE>dst</CODE> - the array to write<DD><CODE>dst_offset</CODE> - the start offset in <code>dst</code>, times 4. This |
907 |
measures the offset as if <code>dst</code> were an array of |
908 |
<code>byte</code>s (rather than <code>int</code>s).<DD><CODE>src</CODE> - the array to read<DD><CODE>src_offset</CODE> - the start offset in <code>src</code><DD><CODE>length</CODE> - the number of <code>byte</code>s to copy.</DL> |
909 |
</DD>
|
910 |
</DL>
|
911 |
<HR>
|
912 |
|
913 |
<A NAME="intsToBytes(byte[], int, int[], int, int)"><!-- --></A><H3> |
914 |
intsToBytes</H3>
|
915 |
<PRE>
|
916 |
public static final void <B>intsToBytes</B>(byte[] dst, |
917 |
int dst_offset,
|
918 |
int[] src,
|
919 |
int src_offset,
|
920 |
int length)</PRE> |
921 |
<DL>
|
922 |
<DD>Convert an array of <code>int</code>s into an array of |
923 |
<code>bytes</code>. |
924 |
<P>
|
925 |
<DD><DL> |
926 |
<DT><B>Parameters:</B><DD><CODE>dst</CODE> - the array to write<DD><CODE>dst_offset</CODE> - the start offset in <code>dst</code><DD><CODE>src</CODE> - the array to read<DD><CODE>src_offset</CODE> - the start offset in <code>src</code>, times 4. This |
927 |
measures the offset as if <code>src</code> were an array of |
928 |
<code>byte</code>s (rather than <code>int</code>s).<DD><CODE>length</CODE> - the number of <code>byte</code>s to copy.</DL> |
929 |
</DD>
|
930 |
</DL>
|
931 |
<HR>
|
932 |
|
933 |
<A NAME="byteToUnsignedInt(byte)"><!-- --></A><H3> |
934 |
byteToUnsignedInt</H3>
|
935 |
<PRE>
|
936 |
public static final int <B>byteToUnsignedInt</B>(byte b)</PRE> |
937 |
<DL>
|
938 |
<DD>Convert a <code>byte</code> into an unsigned integer. |
939 |
<P>
|
940 |
<DD><DL> |
941 |
<DT><B>Parameters:</B><DD><CODE>b</CODE> - the <code>byte</code> to cast |
942 |
<DT><B>Returns:</B><DD>a postiive <code>int</code> whose lowest byte contains the bits |
943 |
of <code>b</code>.</DL> |
944 |
</DD>
|
945 |
</DL>
|
946 |
<HR>
|
947 |
|
948 |
<A NAME="memcpy(byte[], int, byte[], int, int)"><!-- --></A><H3> |
949 |
memcpy</H3>
|
950 |
<PRE>
|
951 |
public static int <B>memcpy</B>(byte[] dst, |
952 |
int dst_offset,
|
953 |
byte[] src,
|
954 |
int src_offset,
|
955 |
int length)</PRE> |
956 |
<DL>
|
957 |
<DD>Copy contents of one array of <code>bytes</code> into another. If either |
958 |
array is <code>null</code>, simply return the <code>length</code> |
959 |
parameter directly. |
960 |
<P>
|
961 |
<DD><DL> |
962 |
<DT><B>Parameters:</B><DD><CODE>dst</CODE> - the array to write, or <code>null</code><DD><CODE>dst_offset</CODE> - the start offset in <code>dst</code><DD><CODE>src</CODE> - the array to read, or <code>null</code><DD><CODE>src_offset</CODE> - the start offset in <code>src</code><DD><CODE>length</CODE> - the number of <code>byte</code>s to copy. |
963 |
<DT><B>Returns:</B><DD>DOCUMENT ME!</DL> |
964 |
</DD>
|
965 |
</DL>
|
966 |
<HR>
|
967 |
|
968 |
<A NAME="memcmp(byte[], int, byte[], int, int)"><!-- --></A><H3> |
969 |
memcmp</H3>
|
970 |
<PRE>
|
971 |
public static boolean <B>memcmp</B>(byte[] a, |
972 |
int a_offset,
|
973 |
byte[] b,
|
974 |
int b_offset,
|
975 |
int length)</PRE> |
976 |
<DL>
|
977 |
<DD>Compare the contents of one array of <code>bytes</code> to another. |
978 |
<P>
|
979 |
<DD><DL> |
980 |
<DT><B>Parameters:</B><DD><CODE>a</CODE> - the first array<DD><CODE>a_offset</CODE> - the start offset in <code>a</code><DD><CODE>b</CODE> - the second array<DD><CODE>b_offset</CODE> - the start offset in <code>b</code><DD><CODE>length</CODE> - the number of <code>byte</code>s to compare. |
981 |
<DT><B>Returns:</B><DD>DOCUMENT ME!</DL> |
982 |
</DD>
|
983 |
</DL>
|
984 |
<HR>
|
985 |
|
986 |
<A NAME="memclr(byte[], int, int)"><!-- --></A><H3> |
987 |
memclr</H3>
|
988 |
<PRE>
|
989 |
public static void <B>memclr</B>(byte[] array, |
990 |
int offset,
|
991 |
int length)</PRE> |
992 |
<DL>
|
993 |
<DD>Fill the given array with zeros.
|
994 |
<P>
|
995 |
<DD><DL> |
996 |
<DT><B>Parameters:</B><DD><CODE>array</CODE> - the array to clear<DD><CODE>offset</CODE> - the start offset<DD><CODE>length</CODE> - the number of <code>byte</code>s to clear.</DL> |
997 |
</DD>
|
998 |
</DL>
|
999 |
<HR>
|
1000 |
|
1001 |
<A NAME="round_up(int, int)"><!-- --></A><H3> |
1002 |
round_up</H3>
|
1003 |
<PRE>
|
1004 |
public static int <B>round_up</B>(int value, |
1005 |
int multiple)</PRE> |
1006 |
<DL>
|
1007 |
<DD>Round a number up to a given multiple.
|
1008 |
<P>
|
1009 |
<DD><DL> |
1010 |
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the number to be rounded<DD><CODE>multiple</CODE> - the number to which to be rounded |
1011 |
<DT><B>Returns:</B><DD>the smallest <code>int</code> greater than or equal to |
1012 |
<code>value</code> which divides <code>multiple</code> exactly.</DL> |
1013 |
</DD>
|
1014 |
</DL>
|
1015 |
<HR>
|
1016 |
|
1017 |
<A NAME="zero_pad(byte[], int)"><!-- --></A><H3> |
1018 |
zero_pad</H3>
|
1019 |
<PRE>
|
1020 |
public static byte[] <B>zero_pad</B>(byte[] original, |
1021 |
int block_size)</PRE> |
1022 |
<DL>
|
1023 |
<DD>Return a new array equal to original except zero-padded to an integral
|
1024 |
mulitple of blocks. If the original is already an integral multiple of |
1025 |
blocks, just return it. |
1026 |
<P>
|
1027 |
<DD><DL> |
1028 |
<DT><B>Parameters:</B><DD><CODE>original</CODE> - the array of <code>byte</code>s to be padded<DD><CODE>block_size</CODE> - the size of the blocks |
1029 |
<DT><B>Returns:</B><DD>an array whose size divides <code>block_size</code> exactly. The |
1030 |
array is either <code>original</code> itself, or a copy whose |
1031 |
first <code>original.length</code> bytes are equal to |
1032 |
<code>original</code>.</DL> |
1033 |
</DD>
|
1034 |
</DL>
|
1035 |
<HR>
|
1036 |
|
1037 |
<A NAME="equals(byte[], byte[])"><!-- --></A><H3> |
1038 |
equals</H3>
|
1039 |
<PRE>
|
1040 |
public static boolean <B>equals</B>(byte[] b1, |
1041 |
byte[] b2)</PRE> |
1042 |
<DL>
|
1043 |
<DD>Determines whether two arrays of <code>byte</code>s contain the same |
1044 |
contents. |
1045 |
<P>
|
1046 |
<DD><DL> |
1047 |
<DT><B>Parameters:</B><DD><CODE>b1</CODE> - The first array<DD><CODE>b2</CODE> - The second array |
1048 |
<DT><B>Returns:</B><DD><code>true</code> if both arrays are <code>null</code>, both |
1049 |
empty, or both of the same length with equal contents.</DL>
|
1050 |
</DD>
|
1051 |
</DL>
|
1052 |
<HR>
|
1053 |
|
1054 |
<A NAME="print_bytes(byte[], int, int)"><!-- --></A><H3> |
1055 |
print_bytes</H3>
|
1056 |
<PRE>
|
1057 |
public static java.lang.String <B>print_bytes</B>(byte[] data, |
1058 |
int offset,
|
1059 |
int length)</PRE> |
1060 |
<DL>
|
1061 |
<DD>Produce a <code>String</code> representation for the specified array of |
1062 |
<code>byte</code>s. Print each <code>byte</code> as two hexadecimal |
1063 |
digits. |
1064 |
<P>
|
1065 |
<DD><DL> |
1066 |
<DT><B>Parameters:</B><DD><CODE>data</CODE> - The array to print<DD><CODE>offset</CODE> - the start offset in <code>data</code><DD><CODE>length</CODE> - the number of <code>byte</code>s to print |
1067 |
<DT><B>Returns:</B><DD>DOCUMENT ME!</DL> |
1068 |
</DD>
|
1069 |
</DL>
|
1070 |
<HR>
|
1071 |
|
1072 |
<A NAME="print_bytes_exact(byte[], int, int)"><!-- --></A><H3> |
1073 |
print_bytes_exact</H3>
|
1074 |
<PRE>
|
1075 |
public static java.lang.String <B>print_bytes_exact</B>(byte[] data, |
1076 |
int offset,
|
1077 |
int length)</PRE> |
1078 |
<DL>
|
1079 |
<DD>DOCUMENT ME!
|
1080 |
<P>
|
1081 |
<DD><DL> |
1082 |
<DT><B>Parameters:</B><DD><CODE>data</CODE> - DOCUMENT ME!<DD><CODE>offset</CODE> - DOCUMENT ME!<DD><CODE>length</CODE> - DOCUMENT ME! |
1083 |
<DT><B>Returns:</B><DD>DOCUMENT ME!</DL> |
1084 |
</DD>
|
1085 |
</DL>
|
1086 |
<HR>
|
1087 |
|
1088 |
<A NAME="print_bytes(byte[])"><!-- --></A><H3> |
1089 |
print_bytes</H3>
|
1090 |
<PRE>
|
1091 |
public static java.lang.String <B>print_bytes</B>(byte[] data)</PRE> |
1092 |
<DL>
|
1093 |
<DD>DOCUMENT ME!
|
1094 |
<P>
|
1095 |
<DD><DL> |
1096 |
<DT><B>Parameters:</B><DD><CODE>data</CODE> - DOCUMENT ME! |
1097 |
<DT><B>Returns:</B><DD>DOCUMENT ME!</DL> |
1098 |
</DD>
|
1099 |
</DL>
|
1100 |
<HR>
|
1101 |
|
1102 |
<A NAME="getUnsigned(byte)"><!-- --></A><H3> |
1103 |
getUnsigned</H3>
|
1104 |
<PRE>
|
1105 |
public static int <B>getUnsigned</B>(byte b)</PRE> |
1106 |
<DL>
|
1107 |
<DD>DOCUMENT ME!
|
1108 |
<P>
|
1109 |
<DD><DL> |
1110 |
<DT><B>Parameters:</B><DD><CODE>b</CODE> - DOCUMENT ME! |
1111 |
<DT><B>Returns:</B><DD>DOCUMENT ME!</DL> |
1112 |
</DD>
|
1113 |
</DL>
|
1114 |
<!-- ========= END OF CLASS DATA ========= -->
|
1115 |
<HR>
|
1116 |
|
1117 |
|
1118 |
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
1119 |
<A NAME="navbar_bottom"><!-- --></A> |
1120 |
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> |
1121 |
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
1122 |
<TR>
|
1123 |
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
1124 |
<A NAME="navbar_bottom_firstrow"><!-- --></A> |
1125 |
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
1126 |
<TR ALIGN="center" VALIGN="top"> |
1127 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
1128 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
1129 |
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
1130 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ByteUtils.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
1131 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
1132 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
1133 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
1134 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
1135 |
</TR>
|
1136 |
</TABLE>
|
1137 |
</TD>
|
1138 |
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
1139 |
</EM>
|
1140 |
</TD>
|
1141 |
</TR>
|
1142 |
|
1143 |
<TR>
|
1144 |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
1145 |
PREV CLASS |
1146 |
NEXT CLASS</FONT></TD> |
1147 |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
1148 |
<A HREF="../../../../../../../index.html" target="_top"><B>FRAMES</B></A> |
1149 |
<A HREF="ByteUtils.html" target="_top"><B>NO FRAMES</B></A> |
1150 |
<SCRIPT type="text/javascript"> |
1151 |
<!--
|
1152 |
if(window==top) {
|
1153 |
document.writeln('<A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
1154 |
}
|
1155 |
//-->
|
1156 |
</SCRIPT>
|
1157 |
<NOSCRIPT>
|
1158 |
<A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A> |
1159 |
</NOSCRIPT>
|
1160 |
|
1161 |
</FONT></TD> |
1162 |
</TR>
|
1163 |
<TR>
|
1164 |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
1165 |
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
1166 |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
1167 |
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
1168 |
</TR>
|
1169 |
</TABLE>
|
1170 |
<A NAME="skip-navbar_bottom"></A> |
1171 |
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
1172 |
|
1173 |
<HR>
|
1174 |
|
1175 |
</BODY>
|
1176 |
</HTML>
|