在对ahxu中的上传文件中的DiskFileUploadEx.class进行反编译时出现了goto语句:
编译后的代码如下:
public List parseRequestEx(HttpServletRequest req)
throws FileUploadException
{
ArrayList InvalidFiles;
ArrayList items;
String contentType;
if(req == null)
throw new NullPointerException("req parameter");
InvalidFiles = new ArrayList();
items = new ArrayList();
contentType = req.getHeader("Content-type");
if(contentType == null || !contentType.startsWith("multipart/"))
throw new org.apache.commons.fileupload.FileUploadBase.InvalidContentTypeException("the request doesn't contain a multipart/form-data or multipart/mixed stream, content type header is " + contentType);
checkIfInMaxSize(req);
byte boundary[];
MultipartStream multi;
boolean nextPart;
int boundaryIndex = contentType.indexOf("boundary=");
if(boundaryIndex < 0)
throw new FileUploadException("the request was rejected because no multipart boundary was found");
boundary = contentType.substring(boundaryIndex + 9).getBytes();
java.io.InputStream input = req.getInputStream();
aUploadProcess = new UploadProcess(req);
aUploadProcess.init();
aUploadProcess.setReportLimitSize(reportLimitSize);
InputSteamEx inputEx = new InputSteamEx(input, aUploadProcess);
multi = new MultipartStream(inputEx, boundary);
String headerEncoding = getHeaderEncoding();
multi.setHeaderEncoding(headerEncoding);
nextPart = multi.skipPreamble();
goto _L1
_L16:
java.util.Map headers;
String fieldName;
headers = parseHeaders(multi.readHeaders());
fieldName = getFieldName(headers);
if(fieldName == null) goto _L3; else goto _L2
_L2:
String subContentType = getHeader(headers, "Content-type");
if(subContentType == null || !subContentType.startsWith("multipart/mixed")) goto _L5; else goto _L4
_L4:
boolean nextSubPart;
byte subBoundary[] = subContentType.substring(subContentType.indexOf("boundary=") + 9).getBytes();
multi.setBoundary(subBoundary);
nextSubPart = multi.skipPreamble();
goto _L6
_L10:
headers = parseHeaders(multi.readHeaders());
if(getFileName(headers) == null) goto _L8; else goto _L7
_L7:
FileItem item;
if(!isInAllowFilesList(getFileName(headers)))
{
InvalidFiles.add(getFileName(headers));
multi.discardBodyData();
continue; /* Loop/switch isn't completed */
}
item = createItem(headers, false);
OutputStream os = item.getOutputStream();
try
{
aUploadProcess.setCurrentUploadFileName(getFileName(headers));
multi.readBodyData(os);
}
finally
{
os.close();
}
items.add(item);
continue; /* Loop/switch isn't completed */
_L8:
multi.discardBodyData();
nextSubPart = multi.readBoundary();
_L6:
if(nextSubPart) goto _L10; else goto _L9
_L9:
multi.setBoundary(boundary);
continue; /* Loop/switch isn't completed */
_L5:
if(getFileName(headers) == null) goto _L12; else goto _L11
_L11:
FileItem item;
if(!isInAllowFilesList(getFileName(headers)))
{
InvalidFiles.add(getFileName(headers));
multi.discardBodyData();
continue; /* Loop/switch isn't completed */
}
item = createItem(headers, false);
OutputStream os = item.getOutputStream();
try
{
aUploadProcess.setCurrentUploadFileName(getFileName(headers));
multi.readBodyData(os);
}
finally
{
os.close();
}
items.add(item);
continue; /* Loop/switch isn't completed */
_L12:
if(!allowField) goto _L14; else goto _L13
_L13:
item = createItem(headers, true);
OutputStream os = item.getOutputStream();
try
{
multi.readBodyData(os);
}
finally
{
os.close();
}
items.add(item);
continue; /* Loop/switch isn't completed */
_L14:
multi.discardBodyData();
continue; /* Loop/switch isn't completed */
_L3:
multi.discardBodyData();
nextPart = multi.readBoundary();
_L1:
if(nextPart) goto _L16; else goto _L15
_L15:
if(!InvalidFiles.isEmpty())
throw new InvalidFileUploadException("Unallowed Files!", InvalidFiles);
break MISSING_BLOCK_LABEL_710;
IOException e;
e;
throw new FileUploadException("Processing of multipart/form-data request failed. " + e.getMessage());
return items;
}
如何对上面的代码进行还原?请高手帮帮
高手帮帮忙 在线等..........
编译后的代码如下:
public List parseRequestEx(HttpServletRequest req)
throws FileUploadException
{
ArrayList InvalidFiles;
ArrayList items;
String contentType;
if(req == null)
throw new NullPointerException("req parameter");
InvalidFiles = new ArrayList();
items = new ArrayList();
contentType = req.getHeader("Content-type");
if(contentType == null || !contentType.startsWith("multipart/"))
throw new org.apache.commons.fileupload.FileUploadBase.InvalidContentTypeException("the request doesn't contain a multipart/form-data or multipart/mixed stream, content type header is " + contentType);
checkIfInMaxSize(req);
byte boundary[];
MultipartStream multi;
boolean nextPart;
int boundaryIndex = contentType.indexOf("boundary=");
if(boundaryIndex < 0)
throw new FileUploadException("the request was rejected because no multipart boundary was found");
boundary = contentType.substring(boundaryIndex + 9).getBytes();
java.io.InputStream input = req.getInputStream();
aUploadProcess = new UploadProcess(req);
aUploadProcess.init();
aUploadProcess.setReportLimitSize(reportLimitSize);
InputSteamEx inputEx = new InputSteamEx(input, aUploadProcess);
multi = new MultipartStream(inputEx, boundary);
String headerEncoding = getHeaderEncoding();
multi.setHeaderEncoding(headerEncoding);
nextPart = multi.skipPreamble();
goto _L1
_L16:
java.util.Map headers;
String fieldName;
headers = parseHeaders(multi.readHeaders());
fieldName = getFieldName(headers);
if(fieldName == null) goto _L3; else goto _L2
_L2:
String subContentType = getHeader(headers, "Content-type");
if(subContentType == null || !subContentType.startsWith("multipart/mixed")) goto _L5; else goto _L4
_L4:
boolean nextSubPart;
byte subBoundary[] = subContentType.substring(subContentType.indexOf("boundary=") + 9).getBytes();
multi.setBoundary(subBoundary);
nextSubPart = multi.skipPreamble();
goto _L6
_L10:
headers = parseHeaders(multi.readHeaders());
if(getFileName(headers) == null) goto _L8; else goto _L7
_L7:
FileItem item;
if(!isInAllowFilesList(getFileName(headers)))
{
InvalidFiles.add(getFileName(headers));
multi.discardBodyData();
continue; /* Loop/switch isn't completed */
}
item = createItem(headers, false);
OutputStream os = item.getOutputStream();
try
{
aUploadProcess.setCurrentUploadFileName(getFileName(headers));
multi.readBodyData(os);
}
finally
{
os.close();
}
items.add(item);
continue; /* Loop/switch isn't completed */
_L8:
multi.discardBodyData();
nextSubPart = multi.readBoundary();
_L6:
if(nextSubPart) goto _L10; else goto _L9
_L9:
multi.setBoundary(boundary);
continue; /* Loop/switch isn't completed */
_L5:
if(getFileName(headers) == null) goto _L12; else goto _L11
_L11:
FileItem item;
if(!isInAllowFilesList(getFileName(headers)))
{
InvalidFiles.add(getFileName(headers));
multi.discardBodyData();
continue; /* Loop/switch isn't completed */
}
item = createItem(headers, false);
OutputStream os = item.getOutputStream();
try
{
aUploadProcess.setCurrentUploadFileName(getFileName(headers));
multi.readBodyData(os);
}
finally
{
os.close();
}
items.add(item);
continue; /* Loop/switch isn't completed */
_L12:
if(!allowField) goto _L14; else goto _L13
_L13:
item = createItem(headers, true);
OutputStream os = item.getOutputStream();
try
{
multi.readBodyData(os);
}
finally
{
os.close();
}
items.add(item);
continue; /* Loop/switch isn't completed */
_L14:
multi.discardBodyData();
continue; /* Loop/switch isn't completed */
_L3:
multi.discardBodyData();
nextPart = multi.readBoundary();
_L1:
if(nextPart) goto _L16; else goto _L15
_L15:
if(!InvalidFiles.isEmpty())
throw new InvalidFileUploadException("Unallowed Files!", InvalidFiles);
break MISSING_BLOCK_LABEL_710;
IOException e;
e;
throw new FileUploadException("Processing of multipart/form-data request failed. " + e.getMessage());
return items;
}
如何对上面的代码进行还原?请高手帮帮
高手帮帮忙 在线等..........
解决方案 »
- mysql数据库连接成功 测试也没问题,但进入网页后在myeclipse报空指针错误,登录注册都正常,还有网页显示不了图片,
- struts2实现ajax+jsp下拉列表二级联动
- 搜索排序最上面,急急急
- 关于jsf的问题
- 请问在JSP页面中加入动画,除了FLASH,APPLET,还有什么方法没??
- 用struts标签 style还起作用吗
- 请问在jsp中如何调用在web.xml中的定义的context-param的值
- 请教OA系统的网络寻呼模块
- 怎样进行文件复制呢?
- 请问,怎么在<body onload=...里来限制窗口的大小和是否显示工具拦和菜单?A
- 怎么用jfreechart画出2条折线???
- 用户权限问题
goto是java中的一个关键字啊,程序直接跳转到指定的地方继续执行。
上biadu找找相关信息吧。
http://hi.baidu.com/qepqgeqqt%5Ftech/blog/item/975f401061c75406213f2ed9.html
你看看吧,共3篇文章,讲的是反编译后的代码还原,看看有没有帮助
int[] list = new int[] { 1, 2, 3, 4 };
if (Boolean.getBoolean("sys")) {
System.out.println("sys");
} else {
check: while (true) {
for (int i = 0; i < list.length; i++) {
if (list[i] == 2) {
continue check;
} else {
break;
}
}
}
}
} 这段代码中的check是起什么做用的,是JAVA的关键字吗
比如用下面的语句:当程序执行到continue这个语句时,程序是执行下面的_L3,还是继续循环下一个呢?
_L14:
multi.discardBodyData();
continue; /* Loop/switch isn't completed */
_L3:
multi.discardBodyData();
nextPart = multi.readBoundary();