javaweb 如何用Java編寫(xiě)外部系統(tǒng)接口實(shí)現(xiàn)文件導(dǎo)入?
如何用Java編寫(xiě)外部系統(tǒng)接口實(shí)現(xiàn)文件導(dǎo)入?// 定義接口import java.io.FileOutputStreampublic interface OperateFile {// 導(dǎo)入文件pub
如何用Java編寫(xiě)外部系統(tǒng)接口實(shí)現(xiàn)文件導(dǎo)入?
// 定義接口import java.io.FileOutputStreampublic interface OperateFile {// 導(dǎo)入文件public boolean importFile(String path,String name)// 導(dǎo)出文件public FileOutputStream exportFile(String path)}//..........................................// 實(shí)現(xiàn)子類(lèi)import java.io.FileOutputStreampublic class OperateFileImp implements OperateFile{public boolean importFile(String path, String name) {// File file = new File(path,name)....// 在此實(shí)現(xiàn)方法,作業(yè)嘛…return false