亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? dataoutputstream.java

?? 《移動(dòng)Agent技術(shù)》一書(shū)的所有章節(jié)源代碼。
?? JAVA
字號(hào):
/*
 * @(#)DataOutputStream.java	1.23 97/01/22
 * 
 * Copyright (c) 1995, 1996 Sun Microsystems, Inc. All Rights Reserved.
 * 
 * This software is the confidential and proprietary information of Sun
 * Microsystems, Inc. ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with Sun.
 * 
 * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
 * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
 * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
 * THIS SOFTWARE OR ITS DERIVATIVES.
 * 
 * CopyrightVersion 1.1_beta
 * 
 */

package java.io;

/**
 * A data input stream lets an application write primitive Java data 
 * types to an output stream in a portable way. An application can 
 * then use a data input stream to read the data back in. 
 *
 * @author  unascribed
 * @version 1.23, 01/22/97
 * @see     java.io.DataInputStream
 * @since   JDK1.0
 */
public
class DataOutputStream extends FilterOutputStream implements DataOutput {
    /**
     * The number of bytes written to the data output stream. 
     *
     * @since   JDK1.0
     */
    protected int written;

    /**
     * Creates a new data output stream to write data to the specified 
     * underlying output stream. 
     *
     * @param   out   the underlying output stream.
     * @see     java.io.FilterOutputStream#out
     * @since   JDK1.0
     */
    public DataOutputStream(OutputStream out) {
	super(out);
    }

    /**
     * Writes the specified byte to the underlying output stream. 
     *
     * @param      b   the <code>byte</code> to be written.
     * @exception  IOException  if an I/O error occurs.
     * @see        java.io.FilterOutputStream#out
     * @since      JDK1.0
     */
    public synchronized void write(int b) throws IOException {
	out.write(b);
	written++;
    }

    /**
     * Writes <code>len</code> bytes from the specified byte array 
     * starting at offset <code>off</code> to the underlying output stream.
     *
     * @param      b     the data.
     * @param      off   the start offset in the data.
     * @param      len   the number of bytes to write.
     * @exception  IOException  if an I/O error occurs.
     * @see        java.io.FilterOutputStream#out
     * @since      JDK1.0
     */
    public synchronized void write(byte b[], int off, int len)
	throws IOException
    {
	out.write(b, off, len);
	written += len;
    }

    /**
     * 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>DataOuputStream</code> 
     * calls the <code>flush</code> method of its underlying output stream.
     *
     * @exception  IOException  if an I/O error occurs.
     * @see        java.io.FilterOutputStream#out
     * @see        java.io.OutputStream#flush()
     * @since      JDK1.0
     */
    public void flush() throws IOException {
	out.flush();
    }

    /**
     * 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>.
     *
     * @param      v   a <code>boolean</code> value to be written.
     * @exception  IOException  if an I/O error occurs.
     * @see        java.io.FilterOutputStream#out
     * @since      JDK1.0
     */
    public final void writeBoolean(boolean v) throws IOException {
	out.write(v ? 1 : 0);
	written++;
    }

    /**
     * Writes out a <code>byte</code> to the underlying output stream as 
     * a 1-byte value. 
     *
     * @param      v   a <code>byte</code> value to be written.
     * @exception  IOException  if an I/O error occurs.
     * @see        java.io.FilterOutputStream#out
     * @since      JDK1.0
     */
    public final void writeByte(int v) throws IOException {
	out.write(v);
	written++;
    }

    /**
     * Writes a <code>short</code> to the underlying output stream as two
     * bytes, high byte first. 
     *
     * @param      v   a <code>short</code> to be written.
     * @exception  IOException  if an I/O error occurs.
     * @see        java.io.FilterOutputStream#out
     * @since      JDK1.0
     */
    public final void writeShort(int v) throws IOException {
	OutputStream out = this.out;
	out.write((v >>> 8) & 0xFF);
	out.write((v >>> 0) & 0xFF);
	written += 2;
    }

    /**
     * Writes a <code>char</code> to the underlying output stream as a 
     * 2-byte value, high byte first. 
     *
     * @param      v   a <code>char</code> value to be written.
     * @exception  IOException  if an I/O error occurs.
     * @see        java.io.FilterOutputStream#out
     * @since      JDK1.0
     */
    public final void writeChar(int v) throws IOException {
	OutputStream out = this.out;
	out.write((v >>> 8) & 0xFF);
	out.write((v >>> 0) & 0xFF);
	written += 2;
    }

    /**
     * Writes an <code>int</code> to the underlying output stream as four
     * bytes, high byte first. 
     *
     * @param      v   an <code>int</code> to be written.
     * @exception  IOException  if an I/O error occurs.
     * @see        java.io.FilterOutputStream#out
     * @since      JDK1.0
     */
    public final void writeInt(int v) throws IOException {
	OutputStream out = this.out;
	out.write((v >>> 24) & 0xFF);
	out.write((v >>> 16) & 0xFF);
	out.write((v >>>  8) & 0xFF);
	out.write((v >>>  0) & 0xFF);
	written += 4;
    }

    /**
     * Writes a <code>long</code> to the underlying output stream as eight
     * bytes, high byte first. 
     *
     * @param      v   a <code>long</code> to be written.
     * @exception  IOException  if an I/O error occurs.
     * @see        java.io.FilterOutputStream#out
     * @since      JDK1.0
     */
    public final void writeLong(long v) throws IOException {
	OutputStream out = this.out;
	out.write((int)(v >>> 56) & 0xFF);
	out.write((int)(v >>> 48) & 0xFF);
	out.write((int)(v >>> 40) & 0xFF);
	out.write((int)(v >>> 32) & 0xFF);
	out.write((int)(v >>> 24) & 0xFF);
	out.write((int)(v >>> 16) & 0xFF);
	out.write((int)(v >>>  8) & 0xFF);
	out.write((int)(v >>>  0) & 0xFF);
	written += 8;
    }

    /**
     * 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 underlying 
     * output stream as a 4-byte quantity, high byte first. 
     *
     * @param      v   a <code>float</code> value to be written.
     * @exception  IOException  if an I/O error occurs.
     * @see        java.io.FilterOutputStream#out
     * @see        java.lang.Float#floatToIntBits(float)
     * @since      JDK1.0
     */
    public final void writeFloat(float v) throws IOException {
	writeInt(Float.floatToIntBits(v));
    }

    /**
     * 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 underlying 
     * output stream as an 8-byte quantity, high byte first. 
     *
     * @param      v   a <code>double</code> value to be written.
     * @exception  IOException  if an I/O error occurs.
     * @see        java.io.FilterOutputStream#out
     * @see        java.lang.Double#doubleToLongBits(double)
     * @since      JDK1.0
     */
    public final void writeDouble(double v) throws IOException {
	writeLong(Double.doubleToLongBits(v));
    }

    /**
     * Writes out the string to the underlying output stream as a 
     * sequence of bytes. Each character in the string is written out, in 
     * sequence, by discarding its high eight bits. 
     *
     * @param      s   a string of bytes to be written.
     * @exception  IOException  if an I/O error occurs.
     * @see        java.io.FilterOutputStream#out
     * @since      JDK1.0
     */
    public final void writeBytes(String s) throws IOException {
	OutputStream out = this.out;
	int len = s.length();
	for (int i = 0 ; i < len ; i++) {
	    out.write((byte)s.charAt(i));
	}
	written += len;
    }

    /**
     * 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. 
     *
     * @param      s   a <code>String</code> value to be written.
     * @exception  IOException  if an I/O error occurs.
     * @see        java.io.DataOutputStream#writeChar(int)
     * @see        java.io.FilterOutputStream#out
     * @since      JDK1.0
     */
    public final void writeChars(String s) throws IOException {
	OutputStream out = this.out;
	int len = s.length();
	for (int i = 0 ; i < len ; i++) {
	    int v = s.charAt(i);
	    out.write((v >>> 8) & 0xFF);
	    out.write((v >>> 0) & 0xFF);
	}
	written += len * 2;
    }

    /**
     * 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. 
     *
     * @param      str   a string to be written.
     * @exception  IOException  if an I/O error occurs.
     * @since      JDK1.0
     */
    public final void writeUTF(String str) throws IOException {
	OutputStream out = this.out;
	int strlen = str.length();
	int utflen = 0;

	for (int i = 0 ; i < strlen ; i++) {
	    int c = str.charAt(i);
	    if ((c >= 0x0001) && (c <= 0x007F)) {
		utflen++;
	    } else if (c > 0x07FF) {
		utflen += 3;
	    } else {
		utflen += 2;
	    }
	}

	if (utflen > 65535)
	    throw new UTFDataFormatException();		  

	out.write((utflen >>> 8) & 0xFF);
	out.write((utflen >>> 0) & 0xFF);
	for (int i = 0 ; i < strlen ; i++) {
	    int c = str.charAt(i);
	    if ((c >= 0x0001) && (c <= 0x007F)) {
		out.write(c);
	    } else if (c > 0x07FF) {
		out.write(0xE0 | ((c >> 12) & 0x0F));
		out.write(0x80 | ((c >>  6) & 0x3F));
		out.write(0x80 | ((c >>  0) & 0x3F));
		written += 2;
	    } else {
		out.write(0xC0 | ((c >>  6) & 0x1F));
		out.write(0x80 | ((c >>  0) & 0x3F));
		written += 1;
	    }
	}
	written += strlen + 2;
    }

    /**
     * Returns the number of bytes written to this data output stream.
     *
     * @return  the value of the <code>written</code> field.
     * @see     java.io.DataOutputStream#written
     * @since   JDK1.0
     */
    public final int size() {
	return written;
    }
}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品灌醉下药二区| 亚洲黄色在线视频| 色噜噜狠狠一区二区三区果冻| 亚洲成人精品影院| 国产欧美日韩视频在线观看| 欧美日韩在线免费视频| 国产高清在线精品| 日本不卡123| 亚洲女同一区二区| 国产三级精品视频| 欧美v日韩v国产v| 欧美四级电影网| av在线播放不卡| 国产在线播放一区二区三区| 亚洲无人区一区| 亚洲视频每日更新| 国产校园另类小说区| 日韩一区和二区| 色综合久久天天| 不卡一区二区三区四区| 国产一区二区不卡在线| 六月丁香婷婷色狠狠久久| 亚洲成人tv网| 亚洲综合小说图片| 亚洲精品国产无套在线观| 国产精品久久久久久亚洲毛片| 久久久久久一二三区| 日韩一级成人av| 7777精品伊人久久久大香线蕉超级流畅 | 亚洲激情男女视频| 国产精品乱子久久久久| 久久先锋影音av鲁色资源网| 欧美电影免费观看完整版| 欧美日韩成人一区二区| 欧美在线短视频| 色琪琪一区二区三区亚洲区| 91丨九色丨国产丨porny| eeuss鲁一区二区三区| 成人精品视频.| 粉嫩av亚洲一区二区图片| 国产高清久久久久| 国产在线精品免费av| 国内精品伊人久久久久av影院| 轻轻草成人在线| 国产白丝精品91爽爽久久| 国产精品一区二区果冻传媒| 精品一区二区综合| 久久er99热精品一区二区| 日韩高清不卡一区二区| 日本欧美加勒比视频| 免费在线看成人av| 久久精品国产99国产精品| 韩国三级在线一区| 国产成人精品免费| 97成人超碰视| 欧美日韩一区二区在线观看视频 | 日韩av在线播放中文字幕| 欧美96一区二区免费视频| 久久国产精品72免费观看| 国产精一品亚洲二区在线视频| 国产成人一级电影| kk眼镜猥琐国模调教系列一区二区| 成人免费看黄yyy456| 91福利资源站| 日韩一级成人av| 久久久精品黄色| 亚洲黄色片在线观看| 午夜精品久久久久久久久久| 美女脱光内衣内裤视频久久网站| 国产一区二区免费看| 99re成人精品视频| 欧美精品高清视频| 久久综合成人精品亚洲另类欧美| 国产精品国产自产拍高清av| 亚洲一区免费观看| 国内精品伊人久久久久av影院| 成人av一区二区三区| 欧美精品日日鲁夜夜添| 久久综合av免费| 亚洲美女精品一区| 久久69国产一区二区蜜臀| 91丨porny丨首页| 日韩欧美高清一区| 亚洲欧美乱综合| 久久99国产精品免费网站| 成年人国产精品| 日韩无一区二区| 亚洲视频免费看| 国产一区二区三区四区五区入口 | 成人av网站大全| 欧美国产一区二区| 爽好多水快深点欧美视频| 国产美女娇喘av呻吟久久| 一本到一区二区三区| 精品久久99ma| 亚洲激情一二三区| 国产麻豆成人传媒免费观看| 一本色道久久综合亚洲aⅴ蜜桃| 91精品国产综合久久久久久久久久 | 亚洲视频1区2区| 麻豆精品在线播放| 欧美午夜电影网| 久久久高清一区二区三区| 午夜精品在线视频一区| 成人av资源下载| 精品国产一二三| 无码av中文一区二区三区桃花岛| 97精品久久久午夜一区二区三区| 精品国产一区a| 日本vs亚洲vs韩国一区三区| 一本色道久久综合精品竹菊| 亚洲国产精品精华液ab| 久久99精品久久久久久久久久久久 | av网站免费线看精品| 久久一留热品黄| 麻豆视频一区二区| 欧美理论电影在线| 亚洲韩国精品一区| 91欧美一区二区| 国产精品久久久久久久浪潮网站| 国产一区二区福利视频| 精品国产凹凸成av人导航| 日韩电影在线观看网站| 欧美在线观看视频一区二区三区| 国产精品成人免费| 成人高清av在线| 国产色婷婷亚洲99精品小说| 韩国理伦片一区二区三区在线播放| 69精品人人人人| 手机精品视频在线观看| 欧美主播一区二区三区| 亚洲自拍偷拍九九九| 色噜噜久久综合| 亚洲一二三四久久| 色婷婷久久99综合精品jk白丝| 中文字幕中文字幕一区二区| av网站免费线看精品| 中文字幕一区二区三区蜜月| 高潮精品一区videoshd| 日本一区二区视频在线| 成人午夜视频在线观看| 国产精品女主播在线观看| zzijzzij亚洲日本少妇熟睡| 中文字幕高清一区| 成人高清视频在线| |精品福利一区二区三区| 91蜜桃传媒精品久久久一区二区| 男女男精品视频网| 欧美一级久久久久久久大片| 久久av资源网| 国产亲近乱来精品视频| av亚洲精华国产精华| 亚洲综合另类小说| 欧美美女网站色| 美国十次了思思久久精品导航| 精品免费日韩av| 岛国一区二区三区| 亚洲精品国产无天堂网2021| 欧美日韩国产综合草草| 琪琪一区二区三区| 久久久国产精品午夜一区ai换脸| 豆国产96在线|亚洲| 一区二区三区在线视频播放| 欧美精品久久99久久在免费线| 精品一二三四区| 国产精品福利电影一区二区三区四区| 一本在线高清不卡dvd| 天天影视涩香欲综合网| 久久丝袜美腿综合| 91首页免费视频| 日韩国产在线观看| 国产欧美日韩精品a在线观看| 97精品久久久久中文字幕| 日韩激情在线观看| 亚洲国产精品成人综合| 欧美色电影在线| 国产成人午夜99999| 亚洲女同一区二区| 日韩女同互慰一区二区| 91老司机福利 在线| 毛片基地黄久久久久久天堂| 中文字幕在线免费不卡| 欧美片在线播放| 成人h动漫精品| 六月丁香婷婷色狠狠久久| 中文字幕亚洲精品在线观看| 日韩一级高清毛片| 色婷婷久久久亚洲一区二区三区| 精品写真视频在线观看| 亚洲精品免费一二三区| 久久综合久久久久88| 色噜噜夜夜夜综合网| 国产精品影视在线| 午夜精品爽啪视频| 欧美国产精品v| 欧美一区二区三区婷婷月色| 色婷婷综合久久久久中文一区二区| 久久激情五月婷婷| 五月天欧美精品| 亚洲天堂av老司机|