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