📄 lerandomaccessfile.html
字号:
</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/mindprod/ledatastream/LERandomAccessFile.html#seek(long)">seek</A></B>(long pos)</CODE>
<BR>
seek to a place in the 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/mindprod/ledatastream/LERandomAccessFile.html#skipBytes(int)">skipBytes</A></B>(int n)</CODE>
<BR>
Skip over 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/mindprod/ledatastream/LERandomAccessFile.html#write(byte[])">write</A></B>(byte[] ba)</CODE>
<BR>
Write an array 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/mindprod/ledatastream/LERandomAccessFile.html#write(byte[], int, int)">write</A></B>(byte[] ba,
int off,
int len)</CODE>
<BR>
Write part of an array 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/mindprod/ledatastream/LERandomAccessFile.html#write(int)">write</A></B>(int ib)</CODE>
<BR>
Write a byte.</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/mindprod/ledatastream/LERandomAccessFile.html#writeBoolean(boolean)">writeBoolean</A></B>(boolean v)</CODE>
<BR>
write a boolean as one byte.</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/mindprod/ledatastream/LERandomAccessFile.html#writeByte(int)">writeByte</A></B>(int v)</CODE>
<BR>
Write a byte.</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/mindprod/ledatastream/LERandomAccessFile.html#writeBytes(java.lang.String)">writeBytes</A></B>(java.lang.String s)</CODE>
<BR>
Write bytes from a String.</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/mindprod/ledatastream/LERandomAccessFile.html#writeChar(int)">writeChar</A></B>(int v)</CODE>
<BR>
Write a char.</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/mindprod/ledatastream/LERandomAccessFile.html#writeChars(java.lang.String)">writeChars</A></B>(java.lang.String s)</CODE>
<BR>
Write a string, even though method called writeChars.</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/mindprod/ledatastream/LERandomAccessFile.html#writeDouble(double)">writeDouble</A></B>(double v)</CODE>
<BR>
Write a double.</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/mindprod/ledatastream/LERandomAccessFile.html#writeFloat(float)">writeFloat</A></B>(float v)</CODE>
<BR>
Write a float.</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/mindprod/ledatastream/LERandomAccessFile.html#writeInt(int)">writeInt</A></B>(int v)</CODE>
<BR>
write an int, 32-bits.</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/mindprod/ledatastream/LERandomAccessFile.html#writeLong(long)">writeLong</A></B>(long v)</CODE>
<BR>
Write i long, 64 bits.</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/mindprod/ledatastream/LERandomAccessFile.html#writeShort(int)">writeShort</A></B>(int v)</CODE>
<BR>
Write an signed short even though parameter is an int.</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/mindprod/ledatastream/LERandomAccessFile.html#writeUTF(java.lang.String)">writeUTF</A></B>(java.lang.String s)</CODE>
<BR>
Write a counted UTF string.</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>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="raf"><!-- --></A><H3>
raf</H3>
<PRE>
protected java.io.RandomAccessFile <B>raf</B></PRE>
<DL>
<DD>to get at the big-endian methods of RandomAccessFile .
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="work"><!-- --></A><H3>
work</H3>
<PRE>
protected byte[] <B>work</B></PRE>
<DL>
<DD>work array for buffering input/output.
<P>
<DL>
</DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="LERandomAccessFile(java.io.File, java.lang.String)"><!-- --></A><H3>
LERandomAccessFile</H3>
<PRE>
public <B>LERandomAccessFile</B>(java.io.File file,
java.lang.String rw)
throws java.io.FileNotFoundException</PRE>
<DL>
<DD>constructor.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>file</CODE> - file to read/write.<DD><CODE>rw</CODE> - like <CODE>RandomAccessFile</CODE> where "r" for read "rw" for read and write, "rws" for read-write sync, and "rwd" for read-write dsync. Sync ensures the physical i/o has completed befor the method returns.
<DT><B>Throws:</B>
<DD><CODE>java.io.FileNotFoundException</CODE> - if open fails.</DL>
</DL>
<HR>
<A NAME="LERandomAccessFile(java.lang.String, java.lang.String)"><!-- --></A><H3>
LERandomAccessFile</H3>
<PRE>
public <B>LERandomAccessFile</B>(java.lang.String file,
java.lang.String rw)
throws java.io.FileNotFoundException</PRE>
<DL>
<DD>constructors.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>file</CODE> - name of file.<DD><CODE>rw</CODE> - string "r" or "rw" depending on read or read/write.
<DT><B>Throws:</B>
<DD><CODE>java.io.FileNotFoundException</CODE> - if open fails.</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="close()"><!-- --></A><H3>
close</H3>
<PRE>
public final void <B>close</B>()
throws java.io.IOException</PRE>
<DL>
<DD>close the file.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if close fails.</DL>
</DD>
</DL>
<HR>
<A NAME="getFD()"><!-- --></A><H3>
getFD</H3>
<PRE>
public final java.io.FileDescriptor <B>getFD</B>()
throws java.io.IOException</PRE>
<DL>
<DD>Get file descriptor.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>file descriptor (handle to open file)
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if get fails.</DL>
</DD>
</DL>
<HR>
<A NAME="getFilePointer()"><!-- --></A><H3>
getFilePointer</H3>
<PRE>
public final long <B>getFilePointer</B>()
throws java.io.IOException</PRE>
<DL>
<DD>get position of marker in the file.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>offset where we are in the file.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if get fails.</DL>
</DD>
</DL>
<HR>
<A NAME="length()"><!-- --></A><H3>
length</H3>
<PRE>
public final long <B>length</B>()
throws java.io.IOException</PRE>
<DL>
<DD>get length of the file.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>length in bytes, note value is a long.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if get fails.</DL>
</DD>
</DL>
<HR>
<A NAME="read()"><!-- --></A><H3>
read</H3>
<PRE>
public final int <B>read</B>()
throws java.io.IOException</PRE>
<DL>
<DD>ready one unsigned byte.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>unsigned byte read.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if read fails.</DL>
</DD>
</DL>
<HR>
<A NAME="read(byte[])"><!-- --></A><H3>
read</H3>
<PRE>
public final int <B>read</B>(byte[] ba)
throws java.io.IOException</PRE>
<DL>
<DD>read an array of bytes.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -