日期:2014-05-17 浏览次数:20666 次
m_totalBytes = m_request.getContentLength();
m_binArray = new byte[m_totalBytes];
int j=0;//
for (; i < m_totalBytes; i += j) {//
try {
m_request.getInputStream();
j = m_request.getInputStream().read(m_binArray, i, m_totalBytes-i);
} catch (Exception exception) {
throw new SmartUploadException("Unable to upload.");
}
}
for (; !flag1 && m_currentIndex < m_totalBytes; m_currentIndex++) {
if (m_binArray[m_currentIndex] == 13){
flag1 = true;
} else {
m_boundary = m_boundary + (char) m_binArray[m_currentIndex];
}
}