第四题中的 not to be or not独白赏析是什么意思

> 【答案带解析】完形填空 阅读下面的短文,掌握其大意,然后从短文后各题所给的A、B、C、D四个选...
完形填空阅读下面的短文,掌握其大意,然后从短文后各题所给的A、B、C、D四个选项中,选择最佳选项。It’s not easy to be an astronaut’s son. Everybody expects you to be perfect, but I’m just a fourteen-year-old kid, and I’m not a special
________ too, when it comes to math, geography, music, and baseball.Well, to be honest, I often dream about being some kind of ________
or doing something special—like saving a child from a burning building. or discovering a new star. I was daydreaming at school one morning when my teacher said there would be a Father’s Day writing competition for the whole school. “I ________ we can have a winner right here in my class.”When I got home, I started to think about what to write. My father is an astronaut. No, I wouldn't start like that. The whole country and maybe even the whole world saw my father as an astronaut, but that wasn’t the way I saw him.How did I see my
________ ? Hmm.I saw him sitting with me in the dark when I had a terrible dream. I
how he hugged me for hours when my dog Spotty was________
by a car. Yes, to me, he wasn’t just a world-famous astronaut. He was my dad.My parents and I went to school on Thursday night. There were so many people in the big hall! My dad looked at me, and I shrugged(耸肩). The third prize was announced and it was not me. I was relieved(释然)and disappointed at the same time. The second prize was announced. It was me
.I went up to the stage and read what I had written, “My father’s son”. When I finished, the people ________ and cheered. I saw my father blowing his nose. Dad cleared his throat and put his hand on my shoulder. “Son, this is the ________
moment of my life.”It was the proudest moment of my life, too. Maybe I’ll never be a great hero or win a Nobel Prize, but it was ________
just to be my father’s son. 1.A.one
C.student
D.person2.A.astronaut
D.man3.A.think
D.hope4.A.father
C.teacher
D.son5.A.felt
B.thanked
C.remembered
D.noticed6.A.killed
B.stopped
D.carried7.A.really
B.surprisingly C.easily
D.especially8.A.stood up
C.walked away
D.walked down9.A.best
B.luckiest
C.happiest
D.proudest10.A.right
B.special
D.different 
试题分析:文章描述了作者在父亲节那天学校的一次作文竞赛中从不一样的角度描述了他的父亲,在别人的眼中他的父亲是宇航员,但是他在作文中描述了父亲对他的关爱,伟大的父爱。在竞赛中获得了二等奖,这成为了作者以及作者的父亲生命中最自豪的时刻。
考点分析:
考点1:人生百味类
人生百味类阅读理解:
& & 阅读能力是中学生学习英语应具备的一种基本能力。学习英语的一个重要目的在于获取信息。通过阅读这一重要手段,我们可以大量地获取知识,拓展知识面,还可以增强语感,培养敏捷的思维能力。
阅读理解也是各地中考试题的必考题型之一,在中考试题中占有较大比例,主要考查学生通过文字获取信息的能力。在中考中,阅读的篇数一般是三到四篇,选材范围越来越广,除故事、幽默、人物轶事外,科普性文章也多了起来。体裁也趋于多样化,有记叙文、说明文、应用文等。还要求学生能理解及解释图表多提供的简单信息等。三四篇短文中有的难度跨度较大,以便拉开档次,体现选拔功能。并且扩大了选材范围,主要考查考生阅读所给材料,理解其中词语、句子或片段含义的能力。有时涉及对全文意思和篇章结构的理解,对一些问题作出推理和判断。阅读理解的考核中包括了对词汇、语法等语言知识的考查,要求学生具备一定的背景知识、各种常识、科普知识和一定的分析及逻辑推理能力;要求学生具有归纳段落大意、中心思想的能力。测试的方向由时间、地点、身份、人物等一些细节问题,改为测试对全文整体意义的理解程度;由考查短文的表层现象改为考对文章深层含义的理解和逻辑推断能力。另外,任务型阅读形式灵活多样,内容丰富多彩,联系实际,易考查学生的灵活运用能力和对语言的综合运用能力。在中考中占30-40分。
相关试题推荐
—Do you know _________ the posters tomorrow?—Near the school gate.A. where they will put up
B. where they put upC. where did they put up
D. where will they put up 
My uncle is a famous writer. He _______ many books since he was young.A. writes
C. is writing
D. has written 
— Where is Jack?—In the sitting room. He ________ TV with his friend now.A. watch
B. watchedC. is watching
D. was watching 
We ___________ breakfast when the phone rang.A. had
B. were having
C. are having
D. have 
My grandpa ___________ a walk after supper every day.A. takes
B. tookC. will take
D. has taken 
题型:完形填空
难度:中等
Copyright @
满分5 学习网 . All Rights Reserved.莎士比亚:to be or not to be That’s a question是什么意思?
莎士比亚:to be or not to be That’s a question是什么意思?
08-10-06 &
中文可以这样翻译.但在英文中这只是表示肯定与否定这一对立问题,要根据语境来看. 这句出自第三幕.其时哈姆雷特为复仇装疯,对一切产生怀疑,却又优柔寡断,矛盾重重 哈: {自言自语} 生存或毁灭, 这是个必答之问题: 是否应默默的忍受坎苛命运之无情打击, 还是应与深如大海之无涯苦难奋然为敌, 并将其克服。 此二抉择, 就竟是哪个较崇高? 死即睡眠, 它不过如此! 倘若一眠能了结心灵之苦楚与肉体之百患, 那么, 此结局是可盼的! 死去, 睡去... 但在睡眠中可能有梦, 啊, 这就是个阻碍: 当我们摆脱了此垂死之皮囊, 在死之长眠中会有何梦来临? 它令我们踌躇, 使我们心甘情愿的承受长年之灾, 否则谁肯容忍人间之百般折磨, 如暴君之政、骄者之傲、失恋之痛、法章之慢、贪官之侮、或庸民之辱, 假如他能简单的一刃了之? 还有谁会肯去做牛做马, 终生疲於操劳, 默默的忍受其苦其难, 而不远走高飞, 飘於渺茫之境, 倘若他不是因恐惧身后之事而使他犹豫不前? 此境乃无人知晓之邦, 自古无返者。 Hamlet:To be, or not to be- that is the question: Whether 'tis nobler in the mind to suffer The slings and arrows of outrageous fortune Or to take arms against a sea of troubles, And by opposing end them. To die- to sleep- N and by a sleep to say we end The heartache, and the thousand natural shocks That flesh is heir to. 'Tis a consummation Devoutly to be wish'd. To die- to sleep. To sleep- perchance to dream: ay, there's the rub! For in that sleep of death what dreams may come When we have shuffled off this mortal coil, Must give us pause. There's the respect That makes calamity of so long life. For who would bear the whips and scorns of time, Th' oppressor's wrong, the proud man's contumely, The pangs of despis'd love, the law's delay, The insolence of office, and the spurns That patient merit of th' unworthy takes, When he himself might his quietus make With a bare bodkin? Who would these fardels bear, To grunt and sweat under a weary life, But that the dread of something after death- The undiscover'd country, from whose bourn No traveller returns- puzzles the will, And makes us rather bear those ills we have Than fly to others that we know not of? Thus conscience does make cowards of us all, And thus the native hue of resolution Is sicklied o'er with the pale cast of thought, And enterprises of great pith and moment With this regard their currents turn awry And lose the name of action.
请登录后再发表评论!
活着还是死去,这是一个问题。 哈姆雷特王子的内心独白,表现他的犹豫不决的性格
请登录后再发表评论!
这句话与上下文有密切关系,很多情况下都可以用这句话,大概意思是:是与不是,这就是关键。
请登录后再发表评论!
是与不是,这是个问题。
请登录后再发表评论!
活着还是死去,这是一个问题
请登录后再发表评论!
哈姆雷特王子的经典独白。生存还是毁灭, 这是个问题。
请登录后再发表评论!
生存还是毁灭这是一个问题
请登录后再发表评论!
生存还是毁灭这是一个问题
请登录后再发表评论!博客分类:
由于SmartUpload中文下载无法支持,反编译后,发现文件是读取了,可将中文文件附加到浏览器头的时候,出错,不提示下载,可能由于大多数IE浏览器默认是以UTF-8发送URL,所以将中文文件名转换为UTF-8可解决问题。
SmartUpload.java
====================================================================================
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: /SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi
// Source File Name:
SmartUpload.java
package com.jspsmart.
import java.io.*;
import java.sql.ResultS
import java.sql.SQLE
import java.util.V
import javax.servlet.*;
import javax.servlet.http.HttpServletR
import javax.servlet.http.HttpServletR
// Referenced classes of package com.jspsmart.upload:
Files, Request, File, SmartUploadException
public class SmartUpload
protected byte m_binArray[];
protected HttpServletRequest m_
protected HttpServletResponse m_
private int m_totalB
private int m_currentI
private int m_startD
private int m_endD
private String m_
private long m_totalMaxFileS
private long m_maxFileS
private Vector m_deniedFilesL
private Vector m_allowedFilesL
private boolean m_denyPhysicalP
private boolean m_forcePhysicalP
private String m_contentD
public static final int SAVE_AUTO = 0;
public static final int SAVE_VIRTUAL = 1;
public static final int SAVE_PHYSICAL = 2;
private Files m_
private Request m_formR
private ServletC
public final void init(ServletConfig config)
throws ServletException
this.config =
protected final ServletConfig getServletConfig()
public SmartUpload()
m_totalBytes = 0;
m_currentIndex = 0;
m_startData = 0;
m_endData = 0;
m_boundary = new String();
m_totalMaxFileSize = 0L;
m_maxFileSize = 0L;
m_deniedFilesList = new Vector();
m_allowedFilesList = new Vector();
m_denyPhysicalPath =
m_forcePhysicalPath =
m_contentDisposition = new String();
m_files = new Files();
m_formRequest = new Request();
public void service(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException
m_request =
m_response =
public void upload()
throws IOException, ServletException
int totalRead = 0;
int readBytes = 0;
long totalFileSize = 0L;
boolean found =
String dataHeader = new String();
String fieldName = new String();
String fileName = new String();
String fileExt = new String();
String filePathName = new String();
String contentType = new String();
String contentDisp = new String();
String typeMIME = new String();
String subTypeMIME = new String();
boolean isFile =
m_totalBytes = m_request.getContentLength();
m_binArray = new byte[m_totalBytes];
for(; totalRead & m_totalB totalRead += readBytes)
readBytes = m_request.getInputStream().read(m_binArray, totalRead, m_totalBytes - totalRead);
catch(Exception exception) { }
for(; !found && m_currentIndex & m_totalB m_currentIndex++)
if(m_binArray[m_currentIndex] == 13)
m_boundary = m_boundary + (char)m_binArray[m_currentIndex];
if(m_currentIndex == 1)
m_currentIndex++;
if(m_currentIndex &= m_totalBytes)
dataHeader = getDataHeader();
m_currentIndex = m_currentIndex + 2;
isFile = dataHeader.indexOf("filename") & 0;
fieldName = getDataFieldValue(dataHeader, "name");
if(isFile)
filePathName = getDataFieldValue(dataHeader, "filename");
fileName = getFileName(filePathName);
fileExt = getFileExt(fileName);
contentType = getContentType(dataHeader);
contentDisp = getContentDisp(dataHeader);
typeMIME = getTypeMIME(contentType);
subTypeMIME = getSubTypeMIME(contentType);
getDataSection();
if(isFile && fileName.length() & 0)
if(m_deniedFilesList.contains(fileExt))
throw new SecurityException("The extension of the file is denied to be uploaded (1015).");
if(!m_allowedFilesList.isEmpty() && !m_allowedFilesList.contains(fileExt))
throw new SecurityException("The extension of the file is not allowed to be uploaded (1010).");
if(m_maxFileSize & (long)0 && (long)((m_endData - m_startData) + 1) & m_maxFileSize)
throw new SecurityException(String.valueOf((new StringBuffer("Size exceeded for this file : ")).append(fileName).append(" (1105).")));
totalFileSize += (m_endData - m_startData) + 1;
if(m_totalMaxFileSize & (long)0 && totalFileSize & m_totalMaxFileSize)
throw new SecurityException("Total File Size exceeded (1110).");
if(isFile)
com.jspsmart.upload.File newFile = new com.jspsmart.upload.File();
newFile.setParent(this);
newFile.setFieldName(fieldName);
newFile.setFileName(fileName);
newFile.setFileExt(fileExt);
newFile.setFilePathName(filePathName);
newFile.setIsMissing(filePathName.length() == 0);
newFile.setContentType(contentType);
newFile.setContentDisp(contentDisp);
newFile.setTypeMIME(typeMIME);
newFile.setSubTypeMIME(subTypeMIME);
if(contentType.indexOf("application/x-macbinary") & 0)
m_startData = m_startData + 128;
newFile.setSize((m_endData - m_startData) + 1);
newFile.setStartData(m_startData);
newFile.setEndData(m_endData);
m_files.addFile(newFile);
String value = new String(m_binArray, m_startData, (m_endData - m_startData) + 1);
m_formRequest.putParameter(fieldName, value);
if((char)m_binArray[m_currentIndex + 1] == '-')
m_currentIndex = m_currentIndex + 2;
} while(true);
public int save(String destPathName)
throws SmartUploadException, IOException, ServletException
return save(destPathName, 0);
public int save(String destPathName, int option)
throws SmartUploadException, IOException, ServletException
int count = 0;
if(destPathName == null)
destPathName = config.getServletContext().getRealPath("/");
if(destPathName.indexOf("/") != -1)
if(destPathName.charAt(destPathName.length() - 1) != '/')
destPathName = String.valueOf(destPathName).concat("/");
if(destPathName.charAt(destPathName.length() - 1) != '\\')
destPathName = String.valueOf(destPathName).concat("\\");
for(int i = 0; i & m_files.getCount(); i++)
if(!m_files.getFile(i).isMissing())
m_files.getFile(i).saveAs(destPathName + m_files.getFile(i).getFileName(), option);
public int getSize()
return m_totalB
public byte getBinaryData(int index)
retval = m_binArray[index];
catch(Exception e)
throw new ArrayIndexOutOfBoundsException("Index out of range (1005).");
public Files getFiles()
public Request getRequest()
return m_formR
public void downloadFile(String sourceFilePathName)
throws IOException, ServletException
downloadFile(sourceFilePathName, null, null);
public void downloadFile(String sourceFilePathName, String contentType)
throws IOException, ServletException
downloadFile(sourceFilePathName, contentType, null);
public void downloadFile(String sourceFilePathName, String contentType, String destFileName)
throws IOException, ServletException
downloadFile(sourceFilePathName, contentType, destFileName, 65000);
public void downloadFile(String sourceFilePathName, String contentType, String destFileName, int blockSize)
throws IOException, ServletException
if(sourceFilePathName == null)
throw new IllegalArgumentException(String.valueOf((new StringBuffer("File '")).append(sourceFilePathName).append("' not found (1040).")));
if(sourceFilePathName.equals(""))
throw new IllegalArgumentException(String.valueOf((new StringBuffer("File '")).append(sourceFilePathName).append("' not found (1040).")));
if(!isVirtual(sourceFilePathName) && m_denyPhysicalPath)
throw new SecurityException("Physical path is denied (1035).");
if(isVirtual(sourceFilePathName))
sourceFilePathName = config.getServletContext().getRealPath(sourceFilePathName);
java.io.File file = new java.io.File(sourceFilePathName);
FileInputStream fileIn = new FileInputStream(file);
long fileLen = file.length();
int readBytes = 0;
int totalRead = 0;
byte b[] = new byte[blockSize];
if(contentType == null)
m_response.setContentType("application/x-msdownload");
if(contentType.length() == 0)
m_response.setContentType("application/x-msdownload");
m_response.setContentType(contentType);
m_response.setContentLength((int)fileLen);
if(destFileName == null){
m_response.addHeader("Content-Disposition", " filename="+ toUtf8String(getFileName(sourceFilePathName)));
if(destFileName.length() == 0)
m_response.addHeader("Content-Disposition", "");
m_response.addHeader("Content-Disposition", " filename=".concat(toUtf8String(destFileName)));
while((long)totalRead & fileLen)
readBytes = fileIn.read(b, 0, blockSize);
totalRead += readB
m_response.getOutputStream().write(b, 0, readBytes);
fileIn.close();
public void downloadField(ResultSet rs, String columnName, String contentType, String destFileName)
throws SQLException, IOException, ServletException
if(rs == null)
throw new IllegalArgumentException("The RecordSet cannot be null (1045).");
if(columnName == null)
throw new IllegalArgumentException("The columnName cannot be null (1050).");
if(columnName.length() == 0)
throw new IllegalArgumentException("The columnName cannot be empty (1055).");
byte b[] = rs.getBytes(columnName);
if(contentType == null)
m_response.setContentType("application/x-msdownload");
if(contentType.length() == 0)
m_response.setContentType("application/x-msdownload");
m_response.setContentType(contentType);
m_response.setContentLength(b.length);
if(destFileName == null)
m_response.addHeader("Content-Disposition", "");
if(destFileName.length() == 0)
m_response.addHeader("Content-Disposition", "");
m_response.addHeader("Content-Disposition", " filename=".concat( toUtf8String(destFileName)));
m_response.getOutputStream().write(b, 0, b.length);
* 将文件名中的汉字转为UTF8编码的串,以便下载时能正确显示另存的文件名.
* @param s 原文件名
* @return 重新编码后的文件名
public static String toUtf8String(String s) {
StringBuffer sb = new StringBuffer();
for (int i = 0; i & s.length(); i++) {
char c = s.charAt(i);
if (c &= 0 && c &= 255) {
sb.append(c);
b = Character.toString(c).getBytes("UTF-8");
} catch (Exception ex) {
System.out.println(ex);
b = new byte[0];
for (int j = 0; j & b. j++) {
int k = b[j];
if (k & 0)
sb.append("%" + Integer.toHexString(k).toUpperCase());
return sb.toString();
public void fieldToFile(ResultSet rs, String columnName, String destFilePathName)
throws SQLException, SmartUploadException, IOException, ServletException
if(config.getServletContext().getRealPath(destFilePathName) != null)
destFilePathName = config.getServletContext().getRealPath(destFilePathName);
InputStream is_data = rs.getBinaryStream(columnName);
FileOutputStream file = new FileOutputStream(destFilePathName);
while((c = is_data.read()) != -1)
file.write(c);
file.close();
catch(Exception e)
throw new SmartUploadException("Unable to save file from the DataBase (1020).");
private String getDataFieldValue(String dataHeader, String fieldName)
String token = new String();
String value = new String();
int pos = 0;
int i = 0;
int start = 0;
int end = 0;
token = String.valueOf((new StringBuffer(String.valueOf(fieldName))).append("=").append('"'));
pos = dataHeader.indexOf(token);
if(pos & 0)
i = pos + token.length();
token = "\"";
end = dataHeader.indexOf(token, i);
if(start & 0 && end & 0)
value = dataHeader.substring(start, end);
private String getFileExt(String fileName)
String value = new String();
int start = 0;
int end = 0;
if(fileName == null)
start = fileName.lastIndexOf(46) + 1;
end = fileName.length();
value = fileName.substring(start, end);
if(fileName.lastIndexOf(46) & 0)
return "";
private String getContentType(String dataHeader)
String token = new String();
String value = new String();
int start = 0;
int end = 0;
token = "Content-Type:";
start = dataHeader.indexOf(token) + token.length();
if(start != -1)
end = dataHeader.length();
value = dataHeader.substring(start, end);
private String getTypeMIME(String ContentType)
String value = new String();
int pos = 0;
pos = ContentType.indexOf("/");
if(pos != -1)
return ContentType.substring(1, pos);
return ContentT
private String getSubTypeMIME(String ContentType)
String value = new String();
int start = 0;
int end = 0;
start = ContentType.indexOf("/") + 1;
if(start != -1)
end = ContentType.length();
return ContentType.substring(start, end);
return ContentT
private String getContentDisp(String dataHeader)
String value = new String();
int start = 0;
int end = 0;
start = dataHeader.indexOf(":") + 1;
end = dataHeader.indexOf(";");
value = dataHeader.substring(start, end);
private void getDataSection()
boolean found =
String dataHeader = new String();
int searchPos = m_currentI
int keyPos = 0;
int boundaryLen = m_boundary.length();
m_startData = m_currentI
m_endData = 0;
if(searchPos &= m_totalBytes)
if(m_binArray[searchPos] == (byte)m_boundary.charAt(keyPos))
if(keyPos == boundaryLen - 1)
m_endData = ((searchPos - boundaryLen) + 1) - 3;
searchPos++;
searchPos++;
keyPos = 0;
} while(true);
m_currentIndex = m_endData + boundaryLen + 3;
private String getDataHeader()
int start = m_currentI
int end = 0;
int len = 0;
boolean found =
while(!found)
if(m_binArray[m_currentIndex] == 13 && m_binArray[m_currentIndex + 2] == 13)
end = m_currentIndex - 1;
m_currentIndex = m_currentIndex + 2;
m_currentIndex++;
String dataHeader = new String(m_binArray, start, (end - start) + 1);
return dataH
private String getFileName(String filePathName)
String token = new String();
String value = new String();
int pos = 0;
int i = 0;
int start = 0;
int end = 0;
pos = filePathName.lastIndexOf(47);
if(pos != -1)
return filePathName.substring(pos + 1, filePathName.length());
pos = filePathName.lastIndexOf(92);
if(pos != -1)
return filePathName.substring(pos + 1, filePathName.length());
return filePathN
public void setDeniedFilesList(String deniedFilesList)
throws SQLException, IOException, ServletException
String ext = "";
if(deniedFilesList != null)
for(int i = 0; i & deniedFilesList.length(); i++)
if(deniedFilesList.charAt(i) == ',')
if(!m_deniedFilesList.contains(ext))
m_deniedFilesList.addElement(ext);
ext = ext + deniedFilesList.charAt(i);
if(ext != "")
m_deniedFilesList.addElement(ext);
m_deniedFilesList =
public void setAllowedFilesList(String allowedFilesList)
String ext = "";
if(allowedFilesList != null)
for(int i = 0; i & allowedFilesList.length(); i++)
if(allowedFilesList.charAt(i) == ',')
if(!m_allowedFilesList.contains(ext))
m_allowedFilesList.addElement(ext);
ext = ext + allowedFilesList.charAt(i);
if(ext != "")
m_allowedFilesList.addElement(ext);
m_allowedFilesList =
public void setDenyPhysicalPath(boolean deny)
m_denyPhysicalPath =
public void setForcePhysicalPath(boolean force)
m_forcePhysicalPath =
public void setContentDisposition(String contentDisposition)
m_contentDisposition = contentD
public void setTotalMaxFileSize(long totalMaxFileSize)
m_totalMaxFileSize = totalMaxFileS
public void setMaxFileSize(long maxFileSize)
m_maxFileSize = maxFileS
protected String getPhysicalPath(String filePathName, int option)
throws IOException
String path = new String();
String fileName = new String();
String fileSeparator = new String();
boolean isPhysical =
fileSeparator = System.getProperty("file.separator");
if(filePathName == null)
throw new IllegalArgumentException("There is no specified destination file (1140).");
if(filePathName.equals(""))
throw new IllegalArgumentException("There is no specified destination file (1140).");
if(filePathName.lastIndexOf("\\") &= 0)
path = filePathName.substring(0, filePathName.lastIndexOf("\\"));
fileName = filePathName.substring(filePathName.lastIndexOf("\\") + 1);
if(filePathName.lastIndexOf("/") &= 0)
path = filePathName.substring(0, filePathName.lastIndexOf("/"));
fileName = filePathName.substring(filePathName.lastIndexOf("/") + 1);
path = path.length() != 0 ? path : "/";
java.io.File physicalPath = new java.io.File(path);
if(physicalPath.exists())
isPhysical =
if(option == 0)
if(isVirtual(path))
path = config.getServletContext().getRealPath(path);
if(path.endsWith(fileSeparator))
path = path + fileN
path = String.valueOf((new StringBuffer(String.valueOf(path))).append(fileSeparator).append(fileName));
if(isPhysical)
if(m_denyPhysicalPath)
throw new IllegalArgumentException("Physical path is denied (1125).");
return filePathN
throw new IllegalArgumentException("This path does not exist (1135).");
if(option == 1)
if(isVirtual(path))
path = config.getServletContext().getRealPath(path);
if(path.endsWith(fileSeparator))
path = path + fileN
path = String.valueOf((new StringBuffer(String.valueOf(path))).append(fileSeparator).append(fileName));
if(isPhysical)
throw new IllegalArgumentException("The path is not a virtual path.");
throw new IllegalArgumentException("This path does not exist (1135).");
if(option == 2)
if(isPhysical)
if(m_denyPhysicalPath)
throw new IllegalArgumentException("Physical path is denied (1125).");
return filePathN
if(isVirtual(path))
throw new IllegalArgumentException("The path is not a physical path.");
throw new IllegalArgumentException("This path does not exist (1135).");
public void uploadInFile(String destFilePathName)
throws SmartUploadException, IOException
int intsize = 0;
int pos = 0;
int readBytes = 0;
if(destFilePathName == null)
throw new IllegalArgumentException("There is no specified destination file (1025).");
if(destFilePathName.length() == 0)
throw new IllegalArgumentException("There is no specified destination file (1025).");
if(!isVirtual(destFilePathName) && m_denyPhysicalPath)
throw new SecurityException("Physical path is denied (1035).");
intsize = m_request.getContentLength();
m_binArray = new byte[intsize];
for(; pos & pos += readBytes)
readBytes = m_request.getInputStream().read(m_binArray, pos, intsize - pos);
catch(Exception exception) { }
if(isVirtual(destFilePathName))
destFilePathName = config.getServletContext().getRealPath(destFilePathName);
java.io.File file = new java.io.File(destFilePathName);
file.createNewFile();
FileOutputStream fileOut = new FileOutputStream(file);
fileOut.write(m_binArray);
fileOut.close();
catch(Exception e)
throw new SmartUploadException("The Form cannot be saved in the specified file (1030).");
private boolean isVirtual(String pathName)
if(config.getServletContext().getRealPath(pathName) != null)
java.io.File virtualFile = new java.io.File(config.getServletContext().getRealPath(pathName));
return virtualFile.exists();
本文转载,转自
heisetoufa
浏览: 8986497 次
来自: 北京
解决了一个文件加载问题,感谢
// 设置不持久化,此处学习,实际根据项目决定
tianhei_3 写道登录:http://localhost ...
18:09:42,101 DEBUG [ ...
(window.slotbydup=window.slotbydup || []).push({
id: '4773203',
container: s,
size: '200,200',
display: 'inlay-fix'

我要回帖

更多关于 not to be什么意思 的文章

 

随机推荐