Package oculus

Examples of oculus.Settings


  PrintWriter out;
 
  @Before
  public void setUp() throws NumberFormatException, UnknownHostException {
    System.out.println(getClass().toString());
    Settings settings = Settings.getReference();
      if(Settings.settingsfile != null)
        if(Settings.settingsfile.contains("null"))
          fail("no settings file found");
     
    try {
      socket = new Socket("127.0.0.1", settings.getInteger(ManualSettings.commandport));
    } catch (IOException e) {
      fail("can NOT connect");
    }
   
    if(socket != null){
      stdin = new BufferedReader(new InputStreamReader(System.in));
      try {
        out = new PrintWriter(new BufferedWriter(
            new OutputStreamWriter(socket.getOutputStream())), true);
      } catch (IOException e) {
        fail("can NOT connect to output socket");
      }
     
     
      // login on connect
      String user = settings.readSetting("user0");
      String pass = settings.readSetting("pass0");
      out.println(user + ":" + pass);
     
      // read feedback
      new Thread(new Runnable() {
        @Override
View Full Code Here

TOP

Related Classes of oculus.Settings

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.