package jdk7;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
public class fileTool {
public InputStream in=null;
//设置支持流复用
public void markSupported(InputStream input){
//不支持
if (!input.markSupported()){
in=new BufferedInputStream(input);
}else{
in=input;
}
}
public InputStream getInputStream(){
in.mark(Integer.MAX_VALUE);
return in;
}
public void marked() throws IOException{
in.reset();
}
public static void main(String[] args) {
// TODO Auto-generated method stub
}
}
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
public class fileTool {
public InputStream in=null;
//设置支持流复用
public void markSupported(InputStream input){
//不支持
if (!input.markSupported()){
in=new BufferedInputStream(input);
}else{
in=input;
}
}
public InputStream getInputStream(){
in.mark(Integer.MAX_VALUE);
return in;
}
public void marked() throws IOException{
in.reset();
}
public static void main(String[] args) {
// TODO Auto-generated method stub
}
}