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

📄 dataoutputstream.html

📁 是MIDP 的API 查詢文件, 大家可以看一下裡面的index.html, 再用Package 或 Class 名字來查.
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="DataOutputStream(java.io.OutputStream)"><!-- --></A><H3>
DataOutputStream</H3>
<PRE>
public <B>DataOutputStream</B>(<A HREF="../../java/io/OutputStream.html">OutputStream</A>&nbsp;out)</PRE>
<DL>
<DD>Creates a new data output stream to write data to the specified underlying output stream.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>out</CODE> - the underlying output stream, to be saved for later                use.</DL>
</DD>
</DL>

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

<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="write(int)"><!-- --></A><H3>
write</H3>
<PRE>
public void <B>write</B>(int&nbsp;b)           throws <A HREF="../../java/io/IOException.html">IOException</A></PRE>
<DL>
<DD>Writes the specified byte (the low eight bits of the argument <code>b</code>) to the underlying output stream. <p> Implements the <code>write</code> method of <code>OutputStream</code>.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../java/io/DataOutput.html#write(int)">write</A></CODE> in interface <CODE><A HREF="../../java/io/DataOutput.html">DataOutput</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/io/OutputStream.html#write(int)">write</A></CODE> in class <CODE><A HREF="../../java/io/OutputStream.html">OutputStream</A></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><A HREF="../../java/io/IOException.html">IOException</A></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[]&nbsp;b,                  int&nbsp;off,                  int&nbsp;len)           throws <A HREF="../../java/io/IOException.html">IOException</A></PRE>
<DL>
<DD>Writes <code>len</code> bytes from the specified byte array starting at offset <code>off</code> to the underlying output stream.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../java/io/DataOutput.html#write(byte[], int, int)">write</A></CODE> in interface <CODE><A HREF="../../java/io/DataOutput.html">DataOutput</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/io/OutputStream.html#write(byte[], int, int)">write</A></CODE> in class <CODE><A HREF="../../java/io/OutputStream.html">OutputStream</A></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><A HREF="../../java/io/IOException.html">IOException</A></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 <A HREF="../../java/io/IOException.html">IOException</A></PRE>
<DL>
<DD>Flushes this data output stream. This forces any buffered output bytes to be written out to the stream. <p> The <code>flush</code> method of <code>DataOutputStream</code> calls the <code>flush</code> method of its underlying output stream.<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../java/io/OutputStream.html#flush()">flush</A></CODE> in class <CODE><A HREF="../../java/io/OutputStream.html">OutputStream</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Throws:</B><DD><CODE><A HREF="../../java/io/IOException.html">IOException</A></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 <A HREF="../../java/io/IOException.html">IOException</A></PRE>
<DL>
<DD>Closes this output stream and releases any system resources associated with the stream. <p> The <code>close</code> method calls its <code>flush</code> method, and then calls the <code>close</code> method of its underlying output stream.<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../java/io/OutputStream.html#close()">close</A></CODE> in class <CODE><A HREF="../../java/io/OutputStream.html">OutputStream</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Throws:</B><DD><CODE><A HREF="../../java/io/IOException.html">IOException</A></CODE> - if an I/O error occurs.</DL>
</DD>
</DL>
<HR>

<A NAME="writeBoolean(boolean)"><!-- --></A><H3>
writeBoolean</H3>
<PRE>
public final void <B>writeBoolean</B>(boolean&nbsp;v)                        throws <A HREF="../../java/io/IOException.html">IOException</A></PRE>
<DL>
<DD>Writes a <code>boolean</code> to the underlying output stream 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>.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../java/io/DataOutput.html#writeBoolean(boolean)">writeBoolean</A></CODE> in interface <CODE><A HREF="../../java/io/DataOutput.html">DataOutput</A></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><A HREF="../../java/io/IOException.html">IOException</A></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&nbsp;v)                     throws <A HREF="../../java/io/IOException.html">IOException</A></PRE>
<DL>
<DD>Writes out a <code>byte</code> to the underlying output stream as a 1-byte value.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../java/io/DataOutput.html#writeByte(int)">writeByte</A></CODE> in interface <CODE><A HREF="../../java/io/DataOutput.html">DataOutput</A></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><A HREF="../../java/io/IOException.html">IOException</A></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&nbsp;v)                      throws <A HREF="../../java/io/IOException.html">IOException</A></PRE>
<DL>
<DD>Writes a <code>short</code> to the underlying output stream as two bytes, high byte first.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../java/io/DataOutput.html#writeShort(int)">writeShort</A></CODE> in interface <CODE><A HREF="../../java/io/DataOutput.html">DataOutput</A></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><A HREF="../../java/io/IOException.html">IOException</A></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&nbsp;v)                     throws <A HREF="../../java/io/IOException.html">IOException</A></PRE>
<DL>
<DD>Writes a <code>char</code> to the underlying output stream as a 2-byte value, high byte first.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../java/io/DataOutput.html#writeChar(int)">writeChar</A></CODE> in interface <CODE><A HREF="../../java/io/DataOutput.html">DataOutput</A></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><A HREF="../../java/io/IOException.html">IOException</A></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&nbsp;v)                    throws <A HREF="../../java/io/IOException.html">IOException</A></PRE>
<DL>
<DD>Writes an <code>int</code> to the underlying output stream as four bytes, high byte first.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../java/io/DataOutput.html#writeInt(int)">writeInt</A></CODE> in interface <CODE><A HREF="../../java/io/DataOutput.html">DataOutput</A></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><A HREF="../../java/io/IOException.html">IOException</A></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&nbsp;v)                     throws <A HREF="../../java/io/IOException.html">IOException</A></PRE>
<DL>
<DD>Writes a <code>long</code> to the underlying output stream as eight bytes, high byte first.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../java/io/DataOutput.html#writeLong(long)">writeLong</A></CODE> in interface <CODE><A HREF="../../java/io/DataOutput.html">DataOutput</A></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><A HREF="../../java/io/IOException.html">IOException</A></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>(<A HREF="../../java/lang/String.html">String</A>&nbsp;s)                      throws <A HREF="../../java/io/IOException.html">IOException</A></PRE>
<DL>
<DD>Writes a string to the underlying output stream as a sequence of characters. Each character is written to the data output stream as if by the <code>writeChar</code> method.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../java/io/DataOutput.html#writeChars(java.lang.String)">writeChars</A></CODE> in interface <CODE><A HREF="../../java/io/DataOutput.html">DataOutput</A></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><A HREF="../../java/io/IOException.html">IOException</A></CODE> - if an I/O error occurs.<DT><B>See Also: </B><DD><A HREF="../../java/io/DataOutputStream.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>(<A HREF="../../java/lang/String.html">String</A>&nbsp;str)                    throws <A HREF="../../java/io/IOException.html">IOException</A></PRE>
<DL>
<DD>Writes a string to the underlying output stream using UTF-8 encoding in a machine-independent manner. <p> First, two bytes are written to the output stream 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 the character.<DD><DL>
<DT><B>Specified by: </B><DD><CODE><A HREF="../../java/io/DataOutput.html#writeUTF(java.lang.String)">writeUTF</A></CODE> in interface <CODE><A HREF="../../java/io/DataOutput.html">DataOutput</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>str</CODE> - a string to be written.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/io/IOException.html">IOException</A></CODE> - if an I/O error occurs.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/DataOutputStream.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<strong>MID Profile</strong></EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../java/io/DataInputStream.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../java/io/InputStream.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="DataOutputStream.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<font size="-1"><a href="mailto:midp-feedback@risc.sps.mot.com">Submit a comment or suggestion</a> Version 2.0 of MID Profile Specification<br>Java is a trademark or registered trademark of Sun Microsystems,  Inc. in the US and other countries. Copyright (c) 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road,Palo Alto, California, 94303, U.S.A.  All Rights Reserved.</font>
</BODY>
</HTML>

⌨️ 快捷键说明

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