Coverage Report - org.apache.xbean.command.Test
 
Classes in this File Line Coverage Branch Coverage Complexity
Test
0%
0/13
0%
0/2
2.5
 
 1  
 /**
 2  
  * Licensed to the Apache Software Foundation (ASF) under one or more
 3  
  * contributor license agreements.  See the NOTICE file distributed with
 4  
  * this work for additional information regarding copyright ownership.
 5  
  * The ASF licenses this file to You under the Apache License, Version 2.0
 6  
  * (the "License"); you may not use this file except in compliance with
 7  
  * the License.  You may obtain a copy of the License at
 8  
  *
 9  
  *      http://www.apache.org/licenses/LICENSE-2.0
 10  
  *
 11  
  * Unless required by applicable law or agreed to in writing, software
 12  
  * distributed under the License is distributed on an "AS IS" BASIS,
 13  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 14  
  * See the License for the specific language governing permissions and
 15  
  * limitations under the License.
 16  
  */
 17  
 package org.apache.xbean.command;
 18  
 
 19  
 import java.io.FileInputStream;
 20  
 import java.io.InputStream;
 21  
 import java.io.PrintStream;
 22  
 
 23  
 /**
 24  
  * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
 25  
  */
 26  0
 public class Test implements Command {
 27  
     
 28  
     public static void _DONT_register() {
 29  0
         CommandRegistry.register("test", Test.class);
 30  0
     }
 31  
 
 32  
     public int main(String[] args, InputStream in, PrintStream out) {
 33  
         try {
 34  0
             InputStream file = new FileInputStream("print.txt");
 35  0
             int b = file.read();
 36  0
             while (b != -1) {
 37  0
                 out.write(b);
 38  0
                 b = file.read();
 39  
             }
 40  0
         } catch (Exception e) {
 41  0
             e.printStackTrace();
 42  0
             return -1;
 43  0
         }
 44  0
         return 0;
 45  
     }
 46  
 }