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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? cnzipoutputstream.java

?? Java程序100例
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
	case DEFLATED:
	    super.write(b, off, len);
	    break;
	case STORED:
	    written += len;
	    if (written - locoff > entry.size) {
		throw new ZipException(
		    "attempt to write past end of STORED entry");
	    }
	    out.write(b, off, len);
	    break;
	default:
	    throw new InternalError("invalid compression method");
	}
	crc.update(b, off, len);
    }

    /**
     * Finishes writing the contents of the ZIP output stream without closing
     * the underlying stream. Use this method when applying multiple filters
     * in succession to the same output stream.
     * @exception ZipException if a ZIP file error has occurred
     * @exception IOException if an I/O exception has occurred
     */
    public void finish() throws IOException {
	ensureOpen();
	if (finished) {
	    return;
	}
	if (entry != null) {
	    closeEntry();
	}
	if (entries.size() < 1) {
	    throw new ZipException("ZIP file must have at least one entry");
	}
	// write central directory
	long off = written;
	Enumeration e = entries.elements();
	while (e.hasMoreElements()) {
	    writeCEN((ZipEntry)e.nextElement());
	}
	writeEND(off, written - off);
	finished = true;
    }

    /**
     * Closes the ZIP output stream as well as the stream being filtered.
     * @exception ZipException if a ZIP file error has occurred
     * @exception IOException if an I/O error has occurred
     */
    public void close() throws IOException {
        if (!closed) {
            super.close();
            closed = true;
        }
    }

    /*
     * Writes local file (LOC) header for specified entry.
     */
    private void writeLOC(ZipEntry e) throws IOException {
	writeInt(LOCSIG);	    // LOC header signature
	writeShort(e.version);      // version needed to extract
	writeShort(e.flag);         // general purpose bit flag
	writeShort(e.method);       // compression method
	writeInt(e.time);           // last modification time
	if ((e.flag & 8) == 8) {
	    // store size, uncompressed size, and crc-32 in data descriptor
	    // immediately following compressed entry data
	    writeInt(0);
	    writeInt(0);
	    writeInt(0);
	} else {
	    writeInt(e.crc);        // crc-32
	    writeInt(e.csize);      // compressed size
	    writeInt(e.size);       // uncompressed size
	}
	byte[] nameBytes = null; 
  try 
  { 
    if (this.encoding.toUpperCase().equals("UTF-8")) 
       nameBytes =getUTF8Bytes(e.name); 
    else 
       nameBytes= e.name.getBytes(this.encoding); 
  } 
  catch(Exception byteE) 
  { 
    nameBytes=getUTF8Bytes(e.name); 
  } 

	writeShort(nameBytes.length);
	writeShort(e.extra != null ? e.extra.length : 0);
	writeBytes(nameBytes, 0, nameBytes.length);
	if (e.extra != null) {
	    writeBytes(e.extra, 0, e.extra.length);
	}
	locoff = written;
    }

    /*
     * Writes extra data descriptor (EXT) for specified entry.
     */
    private void writeEXT(ZipEntry e) throws IOException {
	writeInt(EXTSIG);	    // EXT header signature
	writeInt(e.crc);	    // crc-32
	writeInt(e.csize);	    // compressed size
	writeInt(e.size);	    // uncompressed size
    }

    /*
     * Write central directory (CEN) header for specified entry.
     * REMIND: add support for file attributes
     */
    private void writeCEN(ZipEntry e) throws IOException {
	writeInt(CENSIG);	    // CEN header signature
	writeShort(e.version);	    // version made by
	writeShort(e.version);	    // version needed to extract
	writeShort(e.flag);	    // general purpose bit flag
	writeShort(e.method);	    // compression method
	writeInt(e.time);	    // last modification time
	writeInt(e.crc);	    // crc-32
	writeInt(e.csize);	    // compressed size
	writeInt(e.size);	    // uncompressed size
	byte[] nameBytes = null; 
  try 
  { 
    if (this.encoding.toUpperCase().equals("UTF-8")) 
       nameBytes =getUTF8Bytes(e.name); 
    else 
       nameBytes= e.name.getBytes(this.encoding); 
  } 
  catch(Exception byteE) 
  { 
    nameBytes=getUTF8Bytes(e.name); 
  } 

	writeShort(nameBytes.length);
	writeShort(e.extra != null ? e.extra.length : 0);
	byte[] commentBytes;
	if (e.comment != null) {
	    commentBytes = getUTF8Bytes(e.comment);
	    writeShort(commentBytes.length);
	} else {
	    commentBytes = null;
	    writeShort(0);
	}
	writeShort(0);		    // starting disk number
	writeShort(0);		    // internal file attributes (unused)
	writeInt(0);		    // external file attributes (unused)
	writeInt(e.offset);	    // relative offset of local header
	writeBytes(nameBytes, 0, nameBytes.length);
	if (e.extra != null) {
	    writeBytes(e.extra, 0, e.extra.length);
	}
	if (commentBytes != null) {
	    writeBytes(commentBytes, 0, commentBytes.length);
	}
    }

    /*
     * Writes end of central directory (END) header.
     */
    private void writeEND(long off, long len) throws IOException {
	writeInt(ENDSIG);	    // END record signature
	writeShort(0);		    // number of this disk
	writeShort(0);		    // central directory start disk
	writeShort(entries.size()); // number of directory entries on disk
	writeShort(entries.size()); // total number of directory entries
	writeInt(len);		    // length of central directory
	writeInt(off);		    // offset of central directory
	if (comment != null) {	    // zip file comment
	    byte[] b = getUTF8Bytes(comment);
	    writeShort(b.length);
	    writeBytes(b, 0, b.length);
	} else {
	    writeShort(0);
	}
    }

    /*
     * Writes a 16-bit short to the output stream in little-endian byte order.
     */
    private void writeShort(int v) throws IOException {
	OutputStream out = this.out;
	out.write((v >>> 0) & 0xff);
	out.write((v >>> 8) & 0xff);
	written += 2;
    }

    /*
     * Writes a 32-bit int to the output stream in little-endian byte order.
     */
    private void writeInt(long v) throws IOException {
	OutputStream out = this.out;
	out.write((int)((v >>>  0) & 0xff));
	out.write((int)((v >>>  8) & 0xff));
	out.write((int)((v >>> 16) & 0xff));
	out.write((int)((v >>> 24) & 0xff));
	written += 4;
    }

    /*
     * Writes an array of bytes to the output stream.
     */
    private void writeBytes(byte[] b, int off, int len) throws IOException {
	super.out.write(b, off, len);
	written += len;
    }

    /*
     * Returns the length of String's UTF8 encoding.
     */
    static int getUTF8Length(String s) {
        int count = 0;
        for (int i = 0; i < s.length(); i++) {
            char ch = s.charAt(i); 
            if (ch <= 0x7f) {
                count++;
            } else if (ch <= 0x7ff) {
                count += 2;
            } else {
                count += 3;
            }
        }
        return count;
    }

    /*
     * Returns an array of bytes representing the UTF8 encoding
     * of the specified String.
     */
    private static byte[] getUTF8Bytes(String s) {
	char[] c = s.toCharArray();
	int len = c.length;
	// Count the number of encoded bytes...
	int count = 0;
	for (int i = 0; i < len; i++) {
	    int ch = c[i];
	    if (ch <= 0x7f) {
		count++;
	    } else if (ch <= 0x7ff) {
		count += 2;
	    } else {
		count += 3;
	    }
	}
	// Now return the encoded bytes...
	byte[] b = new byte[count];
	int off = 0;
	for (int i = 0; i < len; i++) {
	    int ch = c[i];
	    if (ch <= 0x7f) {
		b[off++] = (byte)ch;
	    } else if (ch <= 0x7ff) {
		b[off++] = (byte)((ch >> 6) | 0xc0);
		b[off++] = (byte)((ch & 0x3f) | 0x80);
	    } else {
		b[off++] = (byte)((ch >> 12) | 0xe0);
		b[off++] = (byte)(((ch >> 6) & 0x3f) | 0x80);
		b[off++] = (byte)((ch & 0x3f) | 0x80);
	    }
	}
	return b;
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
7777精品久久久大香线蕉| 欧美又粗又大又爽| 欧美午夜精品一区二区蜜桃| 日韩欧美一区二区不卡| 亚洲欧洲另类国产综合| 国产资源精品在线观看| 欧美日韩精品欧美日韩精品一| 7777精品伊人久久久大香线蕉的| 国产精品超碰97尤物18| 韩国av一区二区| 欧美精品久久久久久久多人混战| 中文字幕一区二区三区在线观看| 五月天国产精品| 99在线视频精品| 久久蜜臀精品av| 蜜桃久久久久久| 欧美人与性动xxxx| 亚洲免费av观看| 91麻豆免费在线观看| 国产欧美日韩精品a在线观看| 日本成人在线视频网站| 欧美日韩三级一区二区| 一区二区三区不卡在线观看| www.成人网.com| 国产精品久久久爽爽爽麻豆色哟哟| 久国产精品韩国三级视频| 91精品国产综合久久福利| 视频一区视频二区在线观看| 欧美吞精做爰啪啪高潮| 尤物视频一区二区| 91福利小视频| 亚洲一二三区在线观看| 欧美色精品在线视频| 亚洲国产日韩综合久久精品| 欧美在线三级电影| 性欧美大战久久久久久久久| 欧美亚洲国产一区在线观看网站| 国产精品福利一区| 91免费看片在线观看| 一区二区三区国产精华| 欧美日韩国产一区| 久久精品国产秦先生| 欧美不卡123| 高清国产一区二区| 最新日韩av在线| 欧美裸体一区二区三区| 久久精品免费看| 国产欧美日产一区| 91女厕偷拍女厕偷拍高清| 亚洲国产中文字幕在线视频综合| 欧美日韩激情一区二区三区| 美女一区二区三区在线观看| 欧美一区二区视频在线观看| 国产自产高清不卡| 亚洲女女做受ⅹxx高潮| 欧美日韩国产欧美日美国产精品| 免费观看在线色综合| 国产午夜精品一区二区| 91农村精品一区二区在线| 视频在线观看91| 国产日韩欧美精品在线| 91福利国产精品| 九九九精品视频| 成人免费在线播放视频| 国产成人精品亚洲午夜麻豆| 国产精品久久久久婷婷| 欧美日韩免费在线视频| 久久av资源站| 亚洲欧美日韩国产成人精品影院 | 国产成人精品亚洲777人妖| 亚洲欧洲三级电影| 在线电影院国产精品| 粉嫩av一区二区三区| 中文字幕制服丝袜一区二区三区| 欧美精品在线观看一区二区| 国产美女精品一区二区三区| 一区二区在线观看免费视频播放| 日韩欧美国产系列| 一本高清dvd不卡在线观看| 免费成人在线影院| 一区二区免费在线| 久久久久国产免费免费| 欧美少妇性性性| 成人av午夜电影| 韩国一区二区三区| 一区二区三区欧美亚洲| 中文字幕 久热精品 视频在线| 欧美肥胖老妇做爰| 91美女片黄在线观看| 国产在线精品一区二区夜色| 亚洲综合色婷婷| 国产精品色噜噜| 精品卡一卡二卡三卡四在线| 欧美日韩久久一区| 91麻豆.com| av福利精品导航| 国产精品影视在线观看| 美女在线观看视频一区二区| 亚洲专区一二三| 亚洲免费av观看| 亚洲精品视频一区二区| 国产精品女上位| 亚洲国产精品av| 国产人成亚洲第一网站在线播放| 欧美一区二区三区电影| 99国产精品99久久久久久| 丰满岳乱妇一区二区三区| 韩国av一区二区三区四区| 精品亚洲国内自在自线福利| 蜜芽一区二区三区| 美洲天堂一区二卡三卡四卡视频| 久久蜜桃av一区二区天堂| 亚洲精品在线免费播放| 久久久久综合网| 久久久精品影视| 日韩一级片在线播放| 日韩欧美自拍偷拍| 日韩欧美中文字幕制服| 欧美精品一区二区三| 精品国产伦理网| 国产香蕉久久精品综合网| 久久久99久久精品欧美| 久久精品水蜜桃av综合天堂| 亚洲影院在线观看| 亚洲国产成人高清精品| 亚洲国产精品人人做人人爽| 天堂久久一区二区三区| 蜜臀av亚洲一区中文字幕| 韩国三级电影一区二区| 国产成人精品综合在线观看| 91在线观看地址| 欧美日韩激情在线| 91精品久久久久久蜜臀| 一区二区三区精品在线| 亚洲一区二区欧美激情| 午夜精品成人在线视频| 一区二区三区中文字幕电影 | 国产一区在线观看麻豆| 国产一区二区精品在线观看| 国产综合久久久久久久久久久久 | 伊人性伊人情综合网| 亚洲综合男人的天堂| 青青草原综合久久大伊人精品优势| 蜜桃精品视频在线观看| 国产成人一区在线| 色婷婷久久久亚洲一区二区三区| 欧美精品777| 国产亚洲制服色| 亚洲影院免费观看| 国产一区二区三区av电影| 成人激情黄色小说| 欧美久久一二三四区| 2020国产成人综合网| 亚洲女人的天堂| 麻豆成人av在线| 色八戒一区二区三区| 久久久噜噜噜久噜久久综合| 亚洲国产日韩一区二区| 国产福利91精品一区| 欧美少妇性性性| 国产精品久久久久久久岛一牛影视| 一区二区三区四区激情| 国产成人综合在线播放| 欧美一区二区三区男人的天堂| 中文字幕欧美日韩一区| 青娱乐精品在线视频| 91欧美激情一区二区三区成人| 欧美大白屁股肥臀xxxxxx| 亚洲尤物在线视频观看| 国产99久久久国产精品潘金| 欧美精品一二三| 9191久久久久久久久久久| 成人激情小说网站| 欧洲日韩一区二区三区| 欧美电影在哪看比较好| 国产女主播在线一区二区| 国产精品久久久久影院色老大| 亚洲日本在线看| 日韩电影在线免费观看| 国产在线精品免费| 91丨九色丨国产丨porny| 欧美日免费三级在线| 日韩一级大片在线| 国产精品女主播av| 日韩vs国产vs欧美| 国产馆精品极品| 欧美日韩精品系列| 欧美激情艳妇裸体舞| 91精品国产91久久综合桃花 | gogo大胆日本视频一区| 精品成人私密视频| 九九**精品视频免费播放| 精品污污网站免费看| 一区二区三区日本| 在线视频观看一区| 一区二区三区丝袜| 欧美亚洲国产bt| 亚洲成av人片在线| 欧美挠脚心视频网站| 五月婷婷久久丁香|