microtik tool to vie another router in a network
源代码在线查看: b.java
package com.hoya.util;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.URL;
import java.util.Properties;
public final class b
{
Properties a = new Properties();
String b;
URL c;
File d;
public b(String paramString)
{
try
{
if (!(paramString.startsWith("/")))
paramString = "/" + paramString;
this.b = paramString;
this.c = super.getClass().getResource(paramString);
this.d = new File(this.c.getPath());
}
catch (Exception localException)
{
try
{
this.a.load(super.getClass().getResourceAsStream(paramString));
this.d.lastModified();
}
catch (IOException localIOException2)
{
IOException localIOException1;
(localIOException1 = localIOException2).printStackTrace();
return;
localException;
}
}
}
public final Object a(String paramString1, String paramString2)
{
return this.a.setProperty(paramString1, paramString2);
}
public final int a(String paramString)
{
return a(paramString, -1);
}
public final int a(String paramString, int paramInt)
{
String str;
int i = paramInt;
if ((str = this.a.getProperty(paramString)) == null)
return paramInt;
try
{
i = Integer.parseInt(str);
}
catch (NumberFormatException localNumberFormatException2)
{
NumberFormatException localNumberFormatException1;
(localNumberFormatException1 = localNumberFormatException2).printStackTrace();
}
return i;
}
public final void a()
{
Object localObject;
if (this.d == null)
try
{
this.d = new File("." + this.b);
if (!(this.d.exists()))
this.d.createNewFile();
}
catch (IOException localIOException)
{
(localObject = localIOException).printStackTrace();
}
try
{
this.a.store(new FileOutputStream(this.d), null);
return;
}
catch (Exception localException)
{
(localObject = localException).printStackTrace();
}
}
}