ProfessionalSystem/src/com/ccit/action/MyFileAction.java

(开头部分) 4KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

package com.ccit.action;

import java.util.*;
import java.io.*;
import java.text.*;
import org.apache.struts2.ServletActionContext;
import com.ccit.manager.ObjectManager;
import com.ccit.model.MyFile;
import com.opensymphony.xwork2.*;

@SuppressWarnings({ "unchecked", "serial" })
public class MyFileAction extends ActionSupport {
	private static final long serialVersionUID = 1l;
	private static final int BUFFER_SIZE = 1;
	private File myFile;
	private String contentType;
	private String fileName;
	private String imageFileName;
	private MyFile util;
	private List<MyFile> list;
	private String message;
	private String str;
	private ObjectManager objectManager;

	public String getAllUtil() throws Exception{
		String sql = "";
		if (null != message && message.trim().length() > 0) {
			String _Str = new String(str.getBytes("iso-8859-1"), "utf-8");
			str = _Str;
			sql = "from MyFile where " + message + " like '%" + str + "%'";
		} else {
			sql = "from MyFile";
		}
		message = null;
		list = objectManager.getUtil(sql);
		return "find";
	}

	@SuppressWarnings("unchecked")
	public String updateUtil() throws Exception {
		int id = util.getId();
		if(id == 0){
			boolean flag = false;
			flag = upload();
			if (flag) {
				objectManager.saveObject(util);
				util = null;
				return "ok";
			} else {
				message = "upload err";
				return "saveOrUpdate";
			}
		}
		MyFile tmp = (MyFile) objectManager.getObject(new MyFile(), util.getId());
		if (fileName == null || (fileName != null && fileName.equals(tmp.getS_2()))) {
			util.setS_0(tmp.getS_0());
			util.setS_1(tmp.getS_1());
			util.setS_2(tmp.getS_2());
			objectManager.updateObject(util);
			return getAllUtil();
后面还有 148 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。