• 大小: 1.08M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2020-12-24
  • 语言: Java
  • 标签: Android  上传  图片  

资源简介

android图片上传的demo 源码(含服务器端和客户端源码)

资源截图

代码片段和文件信息

package com.hexiaochun;


import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.hexiaochun.utils.base64Coder;


public class UpServer extends HttpServlet {

private String file;
@Override
protected void doGet(HttpServletRequest req HttpServletResponse resp)
throws ServletException IOException {
// super.doPost(req resp);

}

@Override
protected void doPost(HttpServletRequest req HttpServletResponse resp)
throws ServletException IOException {
file=req.getParameter(“file“);
if(file!=null){
byte[] b= base64Coder.decodeLines(fil

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        529  2013-03-09 09:48  上传\ImageServer\ImageServer\.classpath

     文件        306  2013-08-20 14:34  上传\ImageServer\ImageServer\.mymetadata

     文件       1754  2013-03-09 11:43  上传\ImageServer\ImageServer\.project

     文件        500  2013-03-09 09:48  上传\ImageServer\ImageServer\.settings\.jsdtscope

     文件        109  2013-03-09 09:48  上传\ImageServer\ImageServer\.settings\com.genuitec.eclipse.ws.prefs

     文件        395  2013-03-09 09:48  上传\ImageServer\ImageServer\.settings\org.eclipse.jdt.core.prefs

     文件        471  2013-03-09 09:48  上传\ImageServer\ImageServer\.settings\org.eclipse.wst.common.component

     文件        252  2013-03-09 09:48  上传\ImageServer\ImageServer\.settings\org.eclipse.wst.common.project.facet.core.xml

     文件         49  2013-03-09 09:48  上传\ImageServer\ImageServer\.settings\org.eclipse.wst.jsdt.ui.superType.container

     文件          6  2013-03-09 09:48  上传\ImageServer\ImageServer\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件       1183  2013-03-09 12:19  上传\ImageServer\ImageServer\src\com\hexiaochun\UpServer.java

     文件       9526  2013-03-09 09:58  上传\ImageServer\ImageServer\src\com\hexiaochun\utils\base64Coder.java

     文件        834  2013-03-09 09:48  上传\ImageServer\ImageServer\WebRoot\index.jsp

     文件         36  2013-03-09 09:48  上传\ImageServer\ImageServer\WebRoot\meta-INF\MANIFEST.MF

     文件       2199  2013-08-20 14:34  上传\ImageServer\ImageServer\WebRoot\WEB-INF\classes\com\hexiaochun\UpServer.class

     文件       4170  2013-08-20 14:34  上传\ImageServer\ImageServer\WebRoot\WEB-INF\classes\com\hexiaochun\utils\base64Coder.class

     文件      59590  2013-03-09 09:55  上传\ImageServer\ImageServer\WebRoot\WEB-INF\lib\commons-fileupload-1.2.2.jar

     文件     159509  2013-03-09 09:55  上传\ImageServer\ImageServer\WebRoot\WEB-INF\lib\commons-io-2.0.1.jar

     文件        565  2013-03-09 12:13  上传\ImageServer\ImageServer\WebRoot\WEB-INF\web.xml

     文件        459  2013-08-20 14:33  上传\UpImageApp\UpImageApp\.classpath

     文件        846  2013-03-09 10:05  上传\UpImageApp\UpImageApp\.project

     文件        177  2013-03-09 10:05  上传\UpImageApp\UpImageApp\.settings\org.eclipse.jdt.core.prefs

     文件        990  2013-03-09 13:59  上传\UpImageApp\UpImageApp\AndroidManifest.xml

     文件        990  2013-08-20 14:33  上传\UpImageApp\UpImageApp\bin\AndroidManifest.xml

     文件        337  2013-08-21 08:36  上传\UpImageApp\UpImageApp\bin\classes\com\hexiaochun\BuildConfig.class

     文件        849  2013-08-21 08:36  上传\UpImageApp\UpImageApp\bin\classes\com\hexiaochun\MainActivity$1.class

     文件        911  2013-08-21 08:36  上传\UpImageApp\UpImageApp\bin\classes\com\hexiaochun\MainActivity$MyHandler.class

     文件       8465  2013-08-21 08:36  上传\UpImageApp\UpImageApp\bin\classes\com\hexiaochun\MainActivity.class

     文件        328  2013-08-21 08:36  上传\UpImageApp\UpImageApp\bin\classes\com\hexiaochun\R$attr.class

     文件        435  2013-08-21 08:36  上传\UpImageApp\UpImageApp\bin\classes\com\hexiaochun\R$drawable.class

............此处省略90个文件信息

评论

共有 条评论