/usr/share/doc/libyanfs-java/api/com/sun/xfile/XRandomAccessFile.html is in libyanfs-java 0.0+cvs20070825-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_23) on Sun Sep 25 20:54:34 UTC 2011 -->
<TITLE>
XRandomAccessFile
</TITLE>
<META NAME="date" CONTENT="2011-09-25">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="XRandomAccessFile";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../com/sun/xfile/XFileWriter.html" title="class in com.sun.xfile"><B>PREV CLASS</B></A>
NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?com/sun/xfile/XRandomAccessFile.html" target="_top"><B>FRAMES</B></A>
<A HREF="XRandomAccessFile.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.sun.xfile</FONT>
<BR>
Class XRandomAccessFile</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.sun.xfile.XRandomAccessFile</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD>java.io.DataInput, java.io.DataOutput</DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>XRandomAccessFile</B><DT>extends java.lang.Object<DT>implements java.io.DataOutput, java.io.DataInput</DL>
</PRE>
<P>
Instances of this class support both reading and writing to a
random access file. An application can modify the position in the
file at which the next read or write occurs.
This class provides a sense of security
by offering methods that allow specified mode accesses of
read-only or read-write to files.
<P>
<P>
<HR>
<P>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#XRandomAccessFile(java.lang.String, java.lang.String)">XRandomAccessFile</A></B>(java.lang.String name,
java.lang.String mode)</CODE>
<BR>
Creates a random access file to read from, and optionally
to write to, a file with the specified name.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#XRandomAccessFile(com.sun.xfile.XFile, java.lang.String)">XRandomAccessFile</A></B>(<A HREF="../../../com/sun/xfile/XFile.html" title="class in com.sun.xfile">XFile</A> xf,
java.lang.String mode)</CODE>
<BR>
Creates a random access file stream to read from, and optionally
to write to, the file specified by the <code>XFile</code>
argument.</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#close()">close</A></B>()</CODE>
<BR>
Closes this random access file and flushes any
unwritten data to the file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#flush()">flush</A></B>()</CODE>
<BR>
Forces any buffered output bytes to be written out.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#getFilePointer()">getFilePointer</A></B>()</CODE>
<BR>
Returns the current offset in this file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#length()">length</A></B>()</CODE>
<BR>
Returns the length of this file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#read()">read</A></B>()</CODE>
<BR>
Reads a byte of data from this file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#read(byte[])">read</A></B>(byte[] b)</CODE>
<BR>
Reads up to <code>b.length</code> bytes of data from this file
into an array of bytes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#read(byte[], int, int)">read</A></B>(byte[] b,
int off,
int len)</CODE>
<BR>
Reads up to <code>len</code> bytes of data from this file into
an array of bytes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#readBoolean()">readBoolean</A></B>()</CODE>
<BR>
Reads a <code>boolean</code> from this file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> byte</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#readByte()">readByte</A></B>()</CODE>
<BR>
Reads a signed 8-bit value from this file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> char</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#readChar()">readChar</A></B>()</CODE>
<BR>
Reads a Unicode character from this file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#readDouble()">readDouble</A></B>()</CODE>
<BR>
Reads a <code>double</code> from this file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> float</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#readFloat()">readFloat</A></B>()</CODE>
<BR>
Reads a <code>float</code> from this file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#readFully(byte[])">readFully</A></B>(byte[] b)</CODE>
<BR>
Reads <code>b.length</code> bytes from this file into the byte
array.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#readFully(byte[], int, int)">readFully</A></B>(byte[] b,
int off,
int len)</CODE>
<BR>
Reads exactly <code>len</code> bytes from this file into
the byte array.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#readInt()">readInt</A></B>()</CODE>
<BR>
Reads a signed 32-bit integer from this file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#readLine()">readLine</A></B>()</CODE>
<BR>
Reads the next line of text from this file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#readLong()">readLong</A></B>()</CODE>
<BR>
Reads a signed 64-bit integer from this file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> short</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#readShort()">readShort</A></B>()</CODE>
<BR>
Reads a signed 16-bit number from this file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#readUnsignedByte()">readUnsignedByte</A></B>()</CODE>
<BR>
Reads an unsigned 8-bit number from this file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#readUnsignedShort()">readUnsignedShort</A></B>()</CODE>
<BR>
Reads an unsigned 16-bit number from this file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#readUTF()">readUTF</A></B>()</CODE>
<BR>
Reads in a string from this file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#seek(long)">seek</A></B>(long pos)</CODE>
<BR>
Sets the offset from the beginning of this file at which
the next read or write occurs.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#skipBytes(int)">skipBytes</A></B>(int n)</CODE>
<BR>
Skips exactly <code>n</code> bytes of input.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#write(byte[])">write</A></B>(byte[] b)</CODE>
<BR>
Writes <code>b.length</code> bytes from the specified byte array
starting at offset <code>off</code> to this file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#write(byte[], int, int)">write</A></B>(byte[] b,
int off,
int len)</CODE>
<BR>
Writes <code>len</code> bytes from the specified byte array
starting at offset <code>off</code> to this file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#write(int)">write</A></B>(int b)</CODE>
<BR>
Writes the specified byte to this file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#writeBoolean(boolean)">writeBoolean</A></B>(boolean v)</CODE>
<BR>
Writes a <code>boolean</code> to the file as a 1-byte value.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#writeByte(int)">writeByte</A></B>(int v)</CODE>
<BR>
Writes a <code>byte</code> to the file as a 1-byte value.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#writeBytes(java.lang.String)">writeBytes</A></B>(java.lang.String s)</CODE>
<BR>
Writes the string to the file as a sequence of bytes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#writeChar(int)">writeChar</A></B>(int v)</CODE>
<BR>
Writes a <code>char</code> to the file as a 2-byte value, high
byte first.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#writeChars(java.lang.String)">writeChars</A></B>(java.lang.String s)</CODE>
<BR>
Writes a string to the file as a sequence of characters.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#writeDouble(double)">writeDouble</A></B>(double v)</CODE>
<BR>
Converts the double argument to a <code>long</code> using the
<code>doubleToLongBits</code> method in class <code>Double</code>,
and then writes that <code>long</code> value to the file as an
8-byte quantity, high byte first.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#writeFloat(float)">writeFloat</A></B>(float v)</CODE>
<BR>
Converts the float argument to an <code>int</code> using the
<code>floatToIntBits</code> method in class <code>Float</code>,
and then writes that <code>int</code> value to the file as a
4-byte quantity, high byte first.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#writeInt(int)">writeInt</A></B>(int v)</CODE>
<BR>
Writes an <code>int</code> to the file as four bytes, high byte first.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#writeLong(long)">writeLong</A></B>(long v)</CODE>
<BR>
Writes a <code>long</code> to the file as eight bytes, high byte first.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#writeShort(int)">writeShort</A></B>(int v)</CODE>
<BR>
Writes a <code>short</code> to the file as two bytes, high byte first.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#writeUTF(java.lang.String)">writeUTF</A></B>(java.lang.String str)</CODE>
<BR>
Writes a string to the file using UTF-8 encoding in a
machine-independent manner.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="XRandomAccessFile(com.sun.xfile.XFile, java.lang.String)"><!-- --></A><H3>
XRandomAccessFile</H3>
<PRE>
public <B>XRandomAccessFile</B>(<A HREF="../../../com/sun/xfile/XFile.html" title="class in com.sun.xfile">XFile</A> xf,
java.lang.String mode)
throws java.io.IOException</PRE>
<DL>
<DD>Creates a random access file stream to read from, and optionally
to write to, the file specified by the <code>XFile</code>
argument.
The mode argument must either be equal to <code>"r"</code> or to
<code>"rw"</code>, indicating either to open the file for input,
or for both input and output, respectively.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>xf</CODE> - the XFile object.<DD><CODE>mode</CODE> - the access mode.
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the mode
argument is not equal to <code>"r"</code> or
to <code>"rw"</code>.
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.</DL>
</DL>
<HR>
<A NAME="XRandomAccessFile(java.lang.String, java.lang.String)"><!-- --></A><H3>
XRandomAccessFile</H3>
<PRE>
public <B>XRandomAccessFile</B>(java.lang.String name,
java.lang.String mode)
throws java.io.IOException</PRE>
<DL>
<DD>Creates a random access file to read from, and optionally
to write to, a file with the specified name.
<p>
The mode argument must either be equal to <code>"r"</code> or
<code>"rw"</code>, indicating either to open the file for input
or for both input and output.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the native or URL file name.<DD><CODE>mode</CODE> - the access mode.
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the mode
argument is not equal to <code>"r"</code> or to
<code>"rw"</code>.
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.</DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="read()"><!-- --></A><H3>
read</H3>
<PRE>
public int <B>read</B>()
throws java.io.IOException</PRE>
<DL>
<DD>Reads a byte of data from this file.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the next byte of data, or <code>-1</code> if the
end of the file is reached.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="read(byte[], int, int)"><!-- --></A><H3>
read</H3>
<PRE>
public int <B>read</B>(byte[] b,
int off,
int len)
throws java.io.IOException</PRE>
<DL>
<DD>Reads up to <code>len</code> bytes of data from this file into
an array of bytes.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>b</CODE> - the buffer into which the data is read.<DD><CODE>off</CODE> - the start offset of the data.<DD><CODE>len</CODE> - the maximum number of bytes read.
<DT><B>Returns:</B><DD>the total number of bytes read into the buffer, or
<code>-1</code> if there is no more data because
the end of the file has been reached.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="read(byte[])"><!-- --></A><H3>
read</H3>
<PRE>
public int <B>read</B>(byte[] b)
throws java.io.IOException</PRE>
<DL>
<DD>Reads up to <code>b.length</code> bytes of data from this file
into an array of bytes.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>b</CODE> - the buffer into which the data is read.
<DT><B>Returns:</B><DD>the total number of bytes read into the buffer, or
<code>-1</code> if there is no more data because
the end of this file has been reached.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="readFully(byte[])"><!-- --></A><H3>
readFully</H3>
<PRE>
public final void <B>readFully</B>(byte[] b)
throws java.io.IOException</PRE>
<DL>
<DD>Reads <code>b.length</code> bytes from this file into the byte
array.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>readFully</CODE> in interface <CODE>java.io.DataInput</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>b</CODE> - the buffer into which the data is read.
<DT><B>Throws:</B>
<DD><CODE>java.io.EOFException</CODE> - if this file reaches
the end before reading all the bytes.
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="readFully(byte[], int, int)"><!-- --></A><H3>
readFully</H3>
<PRE>
public final void <B>readFully</B>(byte[] b,
int off,
int len)
throws java.io.IOException</PRE>
<DL>
<DD>Reads exactly <code>len</code> bytes from this file into
the byte array.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>readFully</CODE> in interface <CODE>java.io.DataInput</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>b</CODE> - the buffer into which the data is read.<DD><CODE>off</CODE> - the start offset of the data.<DD><CODE>len</CODE> - the number of bytes to read.
<DT><B>Throws:</B>
<DD><CODE>java.io.EOFException</CODE> - if this file reaches the
end before reading all the bytes.
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="skipBytes(int)"><!-- --></A><H3>
skipBytes</H3>
<PRE>
public int <B>skipBytes</B>(int n)
throws java.io.IOException</PRE>
<DL>
<DD>Skips exactly <code>n</code> bytes of input.
<p>
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>skipBytes</CODE> in interface <CODE>java.io.DataInput</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>n</CODE> - the number of bytes to be skipped.
<DT><B>Returns:</B><DD>the number of bytes skipped, which is always
<code>n</code>.
<DT><B>Throws:</B>
<DD><CODE>java.io.EOFException</CODE> - if this file reaches the end
before skipping all the bytes.
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="write(int)"><!-- --></A><H3>
write</H3>
<PRE>
public void <B>write</B>(int b)
throws java.io.IOException</PRE>
<DL>
<DD>Writes the specified byte to this file.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>write</CODE> in interface <CODE>java.io.DataOutput</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>b</CODE> - the <code>byte</code> to be written.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="write(byte[])"><!-- --></A><H3>
write</H3>
<PRE>
public void <B>write</B>(byte[] b)
throws java.io.IOException</PRE>
<DL>
<DD>Writes <code>b.length</code> bytes from the specified byte array
starting at offset <code>off</code> to this file.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>write</CODE> in interface <CODE>java.io.DataOutput</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>b</CODE> - the data.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="write(byte[], int, int)"><!-- --></A><H3>
write</H3>
<PRE>
public void <B>write</B>(byte[] b,
int off,
int len)
throws java.io.IOException</PRE>
<DL>
<DD>Writes <code>len</code> bytes from the specified byte array
starting at offset <code>off</code> to this file.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>write</CODE> in interface <CODE>java.io.DataOutput</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>b</CODE> - the data.<DD><CODE>off</CODE> - the start offset in the data.<DD><CODE>len</CODE> - the number of bytes to write.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="getFilePointer()"><!-- --></A><H3>
getFilePointer</H3>
<PRE>
public long <B>getFilePointer</B>()
throws java.io.IOException</PRE>
<DL>
<DD>Returns the current offset in this file.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the offset from the beginning of the file, in bytes,
at which the next read or write occurs.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="seek(long)"><!-- --></A><H3>
seek</H3>
<PRE>
public void <B>seek</B>(long pos)
throws java.io.IOException</PRE>
<DL>
<DD>Sets the offset from the beginning of this file at which
the next read or write occurs.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pos</CODE> - the absolute position.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="length()"><!-- --></A><H3>
length</H3>
<PRE>
public long <B>length</B>()
throws java.io.IOException</PRE>
<DL>
<DD>Returns the length of this file.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the length of this file.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="flush()"><!-- --></A><H3>
flush</H3>
<PRE>
public void <B>flush</B>()
throws java.io.IOException</PRE>
<DL>
<DD>Forces any buffered output bytes to be written out.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="close()"><!-- --></A><H3>
close</H3>
<PRE>
public void <B>close</B>()
throws java.io.IOException</PRE>
<DL>
<DD>Closes this random access file and flushes any
unwritten data to the file.
After the file is closed further I/O operations may
throw IOException.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="readBoolean()"><!-- --></A><H3>
readBoolean</H3>
<PRE>
public final boolean <B>readBoolean</B>()
throws java.io.IOException</PRE>
<DL>
<DD>Reads a <code>boolean</code> from this file. This method reads a
single byte from the file. A value of <code>0</code> represents
<code>false</code>. Any other value represents <code>true</code>.
This method blocks until the byte is read, the end of the stream
is detected, or an exception is thrown.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>readBoolean</CODE> in interface <CODE>java.io.DataInput</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the <code>boolean</code> value read.
<DT><B>Throws:</B>
<DD><CODE>java.io.EOFException</CODE> - if this file has reached the end.
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="readByte()"><!-- --></A><H3>
readByte</H3>
<PRE>
public final byte <B>readByte</B>()
throws java.io.IOException</PRE>
<DL>
<DD>Reads a signed 8-bit value from this file. This method reads a
byte from the file. If the byte read is <code>b</code>, where
<code>0 <= b <= 255</code>,
then the result is:
<ul><code>
(byte)(b)
</code></ul>
<p>
This method blocks until the byte is read, the end of the stream
is detected, or an exception is thrown.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>readByte</CODE> in interface <CODE>java.io.DataInput</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the next byte of this file as a signed 8-bit
<code>byte</code>.
<DT><B>Throws:</B>
<DD><CODE>java.io.EOFException</CODE> - if this file has reached the end.
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="readUnsignedByte()"><!-- --></A><H3>
readUnsignedByte</H3>
<PRE>
public final int <B>readUnsignedByte</B>()
throws java.io.IOException</PRE>
<DL>
<DD>Reads an unsigned 8-bit number from this file. This method reads
a byte from this file and returns that byte.
<p>
This method blocks until the byte is read, the end of the stream
is detected, or an exception is thrown.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>readUnsignedByte</CODE> in interface <CODE>java.io.DataInput</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the next byte of this file, interpreted as an unsigned
8-bit number.
<DT><B>Throws:</B>
<DD><CODE>java.io.EOFException</CODE> - if this file has reached the end.
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="readShort()"><!-- --></A><H3>
readShort</H3>
<PRE>
public final short <B>readShort</B>()
throws java.io.IOException</PRE>
<DL>
<DD>Reads a signed 16-bit number from this file. The method reads 2
bytes from this file. If the two bytes read, in order, are
<code>b1</code> and <code>b2</code>, where each of the two values is
between <code>0</code> and <code>255</code>, inclusive, then the
result is equal to:
<ul><code>
(short)((b1 << 8) | b2)
</code></ul>
<p>
This method blocks until the two bytes are read, the end of the
stream is detected, or an exception is thrown.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>readShort</CODE> in interface <CODE>java.io.DataInput</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the next two bytes of this file, interpreted as a signed
16-bit number.
<DT><B>Throws:</B>
<DD><CODE>java.io.EOFException</CODE> - if this file reaches the end before reading
two bytes.
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="readUnsignedShort()"><!-- --></A><H3>
readUnsignedShort</H3>
<PRE>
public final int <B>readUnsignedShort</B>()
throws java.io.IOException</PRE>
<DL>
<DD>Reads an unsigned 16-bit number from this file. This method reads
two bytes from the file. If the bytes read, in order, are
<code>b1</code> and <code>b2</code>, where
<code>0 <= b1, b2 <= 255</code>,
then the result is equal to:
<ul><code>
(b1 << 8) | b2
</code></ul>
<p>
This method blocks until the two bytes are read, the end of the
stream is detected, or an exception is thrown.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>readUnsignedShort</CODE> in interface <CODE>java.io.DataInput</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the next two bytes of this file, interpreted as an unsigned
16-bit integer.
<DT><B>Throws:</B>
<DD><CODE>java.io.EOFException</CODE> - if this file reaches the end before reading
two bytes.
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="readChar()"><!-- --></A><H3>
readChar</H3>
<PRE>
public final char <B>readChar</B>()
throws java.io.IOException</PRE>
<DL>
<DD>Reads a Unicode character from this file. This method reads two
bytes from the file. If the bytes read, in order, are
<code>b1</code> and <code>b2</code>, where
<code>0 <= b1, b2 <= 255</code>,
then the result is equal to:
<ul><code>
(char)((b1 << 8) | b2)
</code></ul>
<p>
This method blocks until the two bytes are read, the end of the
stream is detected, or an exception is thrown.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>readChar</CODE> in interface <CODE>java.io.DataInput</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the next two bytes of this file as a Unicode character.
<DT><B>Throws:</B>
<DD><CODE>java.io.EOFException</CODE> - if this file reaches the end before reading
two bytes.
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="readInt()"><!-- --></A><H3>
readInt</H3>
<PRE>
public final int <B>readInt</B>()
throws java.io.IOException</PRE>
<DL>
<DD>Reads a signed 32-bit integer from this file. This method reads 4
bytes from the file. If the bytes read, in order, are <code>b1</code>,
<code>b2</code>, <code>b3</code>, and <code>b4</code>, where
<code>0 <= b1, b2, b3, b4 <= 255</code>,
then the result is equal to:
<ul><code>
(b1 << 24) | (b2 << 16) + (b3 << 8) + b4
</code></ul>
<p>
This method blocks until the four bytes are read, the end of the
stream is detected, or an exception is thrown.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>readInt</CODE> in interface <CODE>java.io.DataInput</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the next four bytes of this file, interpreted as an
<code>int</code>.
<DT><B>Throws:</B>
<DD><CODE>java.io.EOFException</CODE> - if this file reaches the end before reading
four bytes.
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="readLong()"><!-- --></A><H3>
readLong</H3>
<PRE>
public final long <B>readLong</B>()
throws java.io.IOException</PRE>
<DL>
<DD>Reads a signed 64-bit integer from this file. This method reads eight
bytes from the file. If the bytes read, in order, are
<code>b1</code>, <code>b2</code>, <code>b3</code>,
<code>b4</code>, <code>b5</code>, <code>b6</code>,
<code>b7</code>, and <code>b8,</code> where:
<ul><code>
0 <= b1, b2, b3, b4, b5, b6, b7, b8 <=255,
</code></ul>
<p>
then the result is equal to:
<p><blockquote><pre>
((long)b1 << 56) + ((long)b2 << 48)
+ ((long)b3 << 40) + ((long)b4 << 32)
+ ((long)b5 << 24) + ((long)b6 << 16)
+ ((long)b7 << 8) + b8
</pre></blockquote>
<p>
This method blocks until the eight bytes are read, the end of the
stream is detected, or an exception is thrown.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>readLong</CODE> in interface <CODE>java.io.DataInput</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the next eight bytes of this file, interpreted as a
<code>long</code>.
<DT><B>Throws:</B>
<DD><CODE>java.io.EOFException</CODE> - if this file reaches the end before reading
eight bytes.
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="readFloat()"><!-- --></A><H3>
readFloat</H3>
<PRE>
public final float <B>readFloat</B>()
throws java.io.IOException</PRE>
<DL>
<DD>Reads a <code>float</code> from this file. This method reads an
<code>int</code> value as if by the <code>readInt</code> method
and then converts that <code>int</code> to a <code>float</code>
using the <code>intBitsToFloat</code> method in class
<code>Float</code>.
<p>
This method blocks until the four bytes are read, the end of the
stream is detected, or an exception is thrown.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>readFloat</CODE> in interface <CODE>java.io.DataInput</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the next four bytes of this file, interpreted as a
<code>float</code>.
<DT><B>Throws:</B>
<DD><CODE>java.io.EOFException</CODE> - if this file reaches the end before reading
four bytes.
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.<DT><B>See Also:</B><DD><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#readInt()"><CODE>readInt()</CODE></A>,
<CODE>Float.intBitsToFloat(int)</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="readDouble()"><!-- --></A><H3>
readDouble</H3>
<PRE>
public final double <B>readDouble</B>()
throws java.io.IOException</PRE>
<DL>
<DD>Reads a <code>double</code> from this file. This method reads a
<code>long</code> value as if by the <code>readLong</code> method
and then converts that <code>long</code> to a <code>double</code>
using the <code>longBitsToDouble</code> method in
class <code>Double</code>.
<p>
This method blocks until the eight bytes are read, the end of the
stream is detected, or an exception is thrown.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>readDouble</CODE> in interface <CODE>java.io.DataInput</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the next eight bytes of this file, interpreted as a
<code>double</code>.
<DT><B>Throws:</B>
<DD><CODE>java.io.EOFException</CODE> - if this file reaches the end before reading
eight bytes.
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.<DT><B>See Also:</B><DD><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#readLong()"><CODE>readLong()</CODE></A>,
<CODE>Double.longBitsToDouble(long)</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="readLine()"><!-- --></A><H3>
readLine</H3>
<PRE>
public final java.lang.String <B>readLine</B>()
throws java.io.IOException</PRE>
<DL>
<DD>Reads the next line of text from this file. This method
successively reads bytes from the file until it reaches the end of
a line of text.
<p>
A line of text is terminated by a carriage-return character
(<code>'\r'</code>), a newline character (<code>'\n'</code>), a
carriage-return character immediately followed by a newline
character, or the end of the input stream. The line-terminating
character(s), if any, are included as part of the string returned.
<p>
This method blocks until a newline character is read, a carriage
return and the byte following it are read (to see if it is a
newline), the end of the stream is detected, or an exception is thrown.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>readLine</CODE> in interface <CODE>java.io.DataInput</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the next line of text from this file.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="readUTF()"><!-- --></A><H3>
readUTF</H3>
<PRE>
public final java.lang.String <B>readUTF</B>()
throws java.io.IOException</PRE>
<DL>
<DD>Reads in a string from this file. The string has been encoded
using a modified UTF-8 format.
<p>
The first two bytes are read as if by
<code>readUnsignedShort</code>. This value gives the number of
following bytes that are in the encoded string, not
the length of the resulting string. The following bytes are then
interpreted as bytes encoding characters in the UTF-8 format
and are converted into characters.
<p>
This method blocks until all the bytes are read, the end of the
stream is detected, or an exception is thrown.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>readUTF</CODE> in interface <CODE>java.io.DataInput</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>a Unicode string.
<DT><B>Throws:</B>
<DD><CODE>java.io.EOFException</CODE> - if this file reaches the end before
reading all the bytes.
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.
<DD><CODE>java.io.UTFDataFormatException</CODE> - if the bytes do not represent
valid UTF-8 encoding of a Unicode string.<DT><B>See Also:</B><DD><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#readUnsignedShort()"><CODE>readUnsignedShort()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="writeBoolean(boolean)"><!-- --></A><H3>
writeBoolean</H3>
<PRE>
public final void <B>writeBoolean</B>(boolean v)
throws java.io.IOException</PRE>
<DL>
<DD>Writes a <code>boolean</code> to the file as a 1-byte value. The
value <code>true</code> is written out as the value
<code>(byte)1</code>; the value <code>false</code> is written out
as the value <code>(byte)0</code>.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>writeBoolean</CODE> in interface <CODE>java.io.DataOutput</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>v</CODE> - a <code>boolean</code> value to be written.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="writeByte(int)"><!-- --></A><H3>
writeByte</H3>
<PRE>
public final void <B>writeByte</B>(int v)
throws java.io.IOException</PRE>
<DL>
<DD>Writes a <code>byte</code> to the file as a 1-byte value.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>writeByte</CODE> in interface <CODE>java.io.DataOutput</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>v</CODE> - a <code>byte</code> value to be written.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="writeShort(int)"><!-- --></A><H3>
writeShort</H3>
<PRE>
public final void <B>writeShort</B>(int v)
throws java.io.IOException</PRE>
<DL>
<DD>Writes a <code>short</code> to the file as two bytes, high byte first.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>writeShort</CODE> in interface <CODE>java.io.DataOutput</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>v</CODE> - a <code>short</code> to be written.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="writeChar(int)"><!-- --></A><H3>
writeChar</H3>
<PRE>
public final void <B>writeChar</B>(int v)
throws java.io.IOException</PRE>
<DL>
<DD>Writes a <code>char</code> to the file as a 2-byte value, high
byte first.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>writeChar</CODE> in interface <CODE>java.io.DataOutput</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>v</CODE> - a <code>char</code> value to be written.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="writeInt(int)"><!-- --></A><H3>
writeInt</H3>
<PRE>
public final void <B>writeInt</B>(int v)
throws java.io.IOException</PRE>
<DL>
<DD>Writes an <code>int</code> to the file as four bytes, high byte first.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>writeInt</CODE> in interface <CODE>java.io.DataOutput</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>v</CODE> - an <code>int</code> to be written.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="writeLong(long)"><!-- --></A><H3>
writeLong</H3>
<PRE>
public final void <B>writeLong</B>(long v)
throws java.io.IOException</PRE>
<DL>
<DD>Writes a <code>long</code> to the file as eight bytes, high byte first.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>writeLong</CODE> in interface <CODE>java.io.DataOutput</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>v</CODE> - a <code>long</code> to be written.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="writeFloat(float)"><!-- --></A><H3>
writeFloat</H3>
<PRE>
public final void <B>writeFloat</B>(float v)
throws java.io.IOException</PRE>
<DL>
<DD>Converts the float argument to an <code>int</code> using the
<code>floatToIntBits</code> method in class <code>Float</code>,
and then writes that <code>int</code> value to the file as a
4-byte quantity, high byte first.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>writeFloat</CODE> in interface <CODE>java.io.DataOutput</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>v</CODE> - a <code>float</code> value to be written.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.<DT><B>See Also:</B><DD><CODE>Float.floatToIntBits(float)</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="writeDouble(double)"><!-- --></A><H3>
writeDouble</H3>
<PRE>
public final void <B>writeDouble</B>(double v)
throws java.io.IOException</PRE>
<DL>
<DD>Converts the double argument to a <code>long</code> using the
<code>doubleToLongBits</code> method in class <code>Double</code>,
and then writes that <code>long</code> value to the file as an
8-byte quantity, high byte first.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>writeDouble</CODE> in interface <CODE>java.io.DataOutput</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>v</CODE> - a <code>double</code> value to be written.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.<DT><B>See Also:</B><DD><CODE>Double.doubleToLongBits(double)</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="writeBytes(java.lang.String)"><!-- --></A><H3>
writeBytes</H3>
<PRE>
public final void <B>writeBytes</B>(java.lang.String s)
throws java.io.IOException</PRE>
<DL>
<DD>Writes the string to the file as a sequence of bytes. Each
character in the string is written out, in sequence, by discarding
its high eight bits.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>writeBytes</CODE> in interface <CODE>java.io.DataOutput</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>s</CODE> - a string of bytes to be written.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.</DL>
</DD>
</DL>
<HR>
<A NAME="writeChars(java.lang.String)"><!-- --></A><H3>
writeChars</H3>
<PRE>
public final void <B>writeChars</B>(java.lang.String s)
throws java.io.IOException</PRE>
<DL>
<DD>Writes a string to the file as a sequence of characters. Each
character is written to the data output stream as if by the
<code>writeChar</code> method.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>writeChars</CODE> in interface <CODE>java.io.DataOutput</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>s</CODE> - a <code>String</code> value to be written.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.<DT><B>See Also:</B><DD><A HREF="../../../com/sun/xfile/XRandomAccessFile.html#writeChar(int)"><CODE>writeChar(int)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="writeUTF(java.lang.String)"><!-- --></A><H3>
writeUTF</H3>
<PRE>
public final void <B>writeUTF</B>(java.lang.String str)
throws java.io.IOException</PRE>
<DL>
<DD>Writes a string to the file using UTF-8 encoding in a
machine-independent manner.
<p>
First, two bytes are written to the file as if by the
<code>writeShort</code> method giving the number of bytes to
follow. This value is the number of bytes actually written out,
not the length of the string. Following the length, each character
of the string is output, in sequence, using the UTF-8 encoding
for each character.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>writeUTF</CODE> in interface <CODE>java.io.DataOutput</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>str</CODE> - a string to be written.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../com/sun/xfile/XFileWriter.html" title="class in com.sun.xfile"><B>PREV CLASS</B></A>
NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?com/sun/xfile/XRandomAccessFile.html" target="_top"><B>FRAMES</B></A>
<A HREF="XRandomAccessFile.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>
|