喘JAVA糞?産喝謹?殻涙怦毘響函垓殻猟周 - 園殻秘壇利
作者 佚名技术
来源 NET编程
浏览
发布时间 2012-06-15
rema -= w;
write_pos += w;
start_pos += w;
write_bytes += w;
}
//4.宥岑"響"?殻
retry = 0;
icb.updateBuffer(index, write_bytes);
} catch (InterruptedException e) {
isalive = false;
icb.terminateWriters();
break;
} catch (IOException e) {
if(++retry == HttpReader.MAX_RETRY) {
isalive = false;
icb.terminateWriters();
break;
}
}
}
icb.updateWriterCount();
try {
hr.close();
} catch (Exception e) {}
hr = null;
buf = null;
icb = null;
}
}
喘JAVA糞?産喝謹?殻涙怦毘響函垓殻猟周(3)扮寂:2011-09-09 blogjava funinhand膨、IRandomAccess俊笥?昧字響函猟周俊笥?BuffRandAcceURL窃才 BuffRandAcceFile窃糞?俊笥圭隈。BuffRandAcceFile窃糞?響函云仇甘徒猟周 ?宸隅祥音公竃凪坿鷹阻。 package instream; public interface IRandomAccess { public int read() throws Exception; public int read(byte b[]) throws Exception; public int read(byte b[], int off, int len) throws Exception; public int dump(int src_off, byte b[], int dst_off, int len) throws Exception; public void seek(long pos) throws Exception; public long length(); public long getFilePointer(); public void close(); } 励、BuffRandAcceURL窃孔嬬?幹秀和墮?殻?read圭隈貫buf[]響方象。 購囚頁泌採酒汽嗤丼契峭棒迄?參和峪頁厘議匯肝晦編?萩峺屎。 /** *//** * http://www.5a520.cn http://www.bt285.cn */ package instream; import java.net.URL; import java.net.URLDecoder; import decode.Header; import tag.MP3Tag; import tag.TagThread; public final class BuffRandAcceURL implements IRandomAccess, IWriterCallBack { public static final int UNIT_LENGTH_BITS = 15; //32K public static final int UNIT_LENGTH = 1 << UNIT_LENGTH_BITS; public static final int BUF_LENGTH = UNIT_LENGTH << 4; //16翠 public static final int UNIT_COUNT = BUF_LENGTH >> UNIT_LENGTH_BITS; public static final int BUF_LENGTH_MASK = (BUF_LENGTH - 1); |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |
你可能对下面的文章感兴趣
关于喘JAVA糞?産喝謹?殻涙怦毘響函垓殻猟周 - 園殻秘壇利的所有评论