C#实现下载功能protected void Button4_Click(object sender, EventArgs e) { string fileName = "aaa.txt";//客户端保存的文件名 string filePath = Server.MapPath("DownLoad/...
分类:
其他好文 时间:
2014-09-18 20:37:34
阅读次数:
177
压缩文件 public static void main(String[] args) throws IOException { String filePath = "E:\\技术部员工工作"; ZipOutputStream outputStream = new ...
分类:
编程语言 时间:
2014-09-18 13:01:03
阅读次数:
221
该Shell脚本用于实现将DB2数据库表导出到文件,将在另一篇博文《Java代码调用Shell脚本并传入参数实现DB2数据库表导出到文件》中通过Java代码实现调用该脚本并传入参数。#!/usr/bin/envsh
DBSCHEMA=$1
DBUSER=$2
DBPASSWORD=$3
TABLENAME=$4
FILEPATH=$5
DELIMITER=$6
EXPORTL..
分类:
数据库 时间:
2014-09-16 19:07:21
阅读次数:
273
StreamWriter sr = new StreamWriter( filePath //filePath是创建的文件的完整路径 , false //如果文件存在是否向文件末尾追加内容(如果文件不存在则创建) , Encoding.Default //以当前的ANSI代码页进行编码 );
分类:
其他好文 时间:
2014-09-16 15:47:10
阅读次数:
129
public?static?void?main(String[]?args){
String?filePath?=?"文件夹路径";
try?{
System.out.println("开始读取文件夹");
List<String>?list?=?new?ArrayList<String>();
List<String...
分类:
其他好文 时间:
2014-09-15 18:00:19
阅读次数:
147
有时候一个文件格式正确在某些情况下不一定能够正确播放,下面可以借助于java的一个类帮助我们把文件格式转正确
File source = new File(filepath);
int index=amr.lastIndexOf(".");
wavFile=amr.substring(0,index)+".wav";
File target = new File(wavFile);
Au...
分类:
编程语言 时间:
2014-09-15 11:16:58
阅读次数:
275
首先把IniFiles加入到interface的uses里,这样才能使用Tinifile类,其他代码如下implementation{$R *.dfm}var inifile: Tinifile; filepath: string;procedure TForm1.Button1Clic...
分类:
其他好文 时间:
2014-09-13 10:31:54
阅读次数:
131
public class FtpHelper { /// /// ftp方式上传 /// public static int UploadFtp(string filePath, string filename, string f...
分类:
其他好文 时间:
2014-09-12 11:38:03
阅读次数:
192
public void DownLoad( ){ string filePath = Server.MapPath( @"\UserFile\" );//这里注意了,你得指明要下载文件的路径. if ( System.IO.File.Exists( filePath ) ) ...
分类:
Web程序 时间:
2014-09-11 18:44:12
阅读次数:
195
对于实体,进行底层方法测试的时候,经常逐一赋值很麻烦,网上找到序列化xml方法,感觉挺好用的。前端调用方法时,将实体序列化写入xml文件 //xml路径 string filePath = @"D:\1.xml"; ...
分类:
其他好文 时间:
2014-09-10 12:13:20
阅读次数:
207