Demos and Usage of java.io.FileInputStream.FileInputStream(File file)


   1:         {
   2:             FileInputStream     fis  = new FileInputStream(".");
   3:             System.out.println("1 FAIL! Should throw java.io.FileNotFoundException!");
   4:         ...
   5:             File                file = new File(".");
   6:             FileInputStream     fis  = new FileInputStream(file);
   7:             System.out.println("2 FAIL! Should throw java.io.FileNotFoundException!");
   8:         ...
   9:         {
  10:             FileInputStream     fis  = new FileInputStream(file);
  11:             System.out.println("5 Success.");

View Full Code Here
   1:       StreamTokenizer st = new StreamTokenizer(new 
   2:                                FileInputStream("./stream-tokenizer.data"));
   3: 
   4:       System.out.println("No tokens read: " + st.toString());
   5:       int j = 0;

View Full Code Here
   1:                     getSlideToken("root"), module.getPath() , "link_test.sxw",
   2:                     new FileInputStream("./test/data/link/link_test.sxw"));
   3: 
   4:         ...
   5:             action = ss.getWriteFile(getSlideToken("root"));
   6:             action.setContent(new FileInputStream("./test/data/link/test.jpg"));
   7:             action.setContentLength(new File("./test/data/link/test.jpg")
   8:                     .length());
   9:             action.setContentType("image/jpeg");

View Full Code Here
   1:     private Object readHandle() throws Exception {
   2:         ObjectInputStream in = new ObjectInputStream(new FileInputStream("../temp/" + this.getClass() + ".ser"));
   3:         Object handle = in.readObject();
   4:         in.close();
   5:         return handle;

View Full Code Here
   1:     private Object readHandle() throws Exception {
   2:         ObjectInputStream in = new ObjectInputStream(new FileInputStream("../temp/" + this.getClass() + ".ser"));
   3:         Object handle = in.readObject();
   4:         in.close();
   5:         return handle;

View Full Code Here
   1:         try{
   2:             StreamSource stsource = new StreamSource(new FileInputStream("../data/city.xml"));
   3:             XMLStreamReader streamReader =  factory.createXMLStreamReader(stsource);
   4:             while(streamReader.hasNext()){
   5:                 System.out.println(streamReader.next());

View Full Code Here
   1:             writer.pushIndent();
   2:             writer.println("java.io.FileInputStream fin = new java.io.FileInputStream("+name+");");
   3:             writer.println("oin = new java.io.ObjectInputStream(fin);");
   4:             writer.println("_jspx_html_data = (char[][]) oin.readObject();");
   5:             writer.popIndent();

View Full Code Here

  

View Full Code Here
   1:         try {
   2:             din = new DataInputStream(new FileInputStream("."+InetAddress.getLocalHost().getHostName()+"WavefrontService.id"));
   3:             serviceID = new ServiceID(din);
   4:         } 
   5:         catch(Exception e) {

View Full Code Here
   1:             {
   2:                 FileInputStream in = new FileInputStream("./Schemas/Schema.dat");
   3:                 schemas.load(in);
   4:                 in.close();
   5:             }

View Full Code Here
   1:             DOMParser parser = new DOMParser();
   2:             parser.parse(new InputSource(new FileInputStream(XMLfile)));
   3:             Document  doc = parser.getDocument();
   4:         ...
   5:          DOMParser parser = new DOMParser();     
   6:          parser.parse(new InputSource(new FileInputStream("../webapps/opelix/xml/UserProfile/UPForm.xml")));
   7:          Document  doc = parser.getDocument();             
   8:         ...
   9:              DOMParser parser = new DOMParser();
  10:              parser.parse(new InputSource(new FileInputStream("../webapps/opelix/xml/UserProfile/UPForm.xml")));
  11:              Document doc = parser.getDocument();  

View Full Code Here