Deprecation fixes

This commit is contained in:
str4d
2013-11-25 23:29:48 +00:00
parent e77409e57a
commit 0347c56c96
4 changed files with 4 additions and 7 deletions

View File

@ -114,7 +114,7 @@ public class DesktopguiConfigurationFrame extends javax.swing.JFrame {
System.out.println("Enabling desktopgui");
}
try {
RouterManager.getRouterContext().setProperty(property, value);
RouterManager.getRouterContext().router().saveConfig(property, value);
} catch (Exception ex) {
Logger.getLogger(DesktopguiConfigurationFrame.class.getName()).log(Level.SEVERE, null, ex);
}

View File

@ -28,7 +28,6 @@ import i2p.susi.util.ReadBuffer;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.StringBufferInputStream;
/**
* @author susi
@ -58,7 +57,7 @@ public class Base64 implements Encoding {
*/
public String encode(String str) throws EncodingException {
try {
return encode( new StringBufferInputStream( str ) );
return encode( new ByteArrayInputStream( str.getBytes() ) );
}catch (IOException e) {
throw new EncodingException( e.getMessage() );
}

View File

@ -29,7 +29,6 @@ import i2p.susi.util.ReadBuffer;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.StringBufferInputStream;
/**
* @author susi
@ -47,7 +46,7 @@ public class HeaderLine implements Encoding {
*/
public String encode(String text) throws EncodingException {
try {
return encode( new StringBufferInputStream( text ) );
return encode( new ByteArrayInputStream( text.getBytes() ) );
} catch (IOException e) {
throw new EncodingException( "IOException occured." );
}

View File

@ -29,7 +29,6 @@ import i2p.susi.util.ReadBuffer;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.StringBufferInputStream;
/**
* @author susi
@ -57,7 +56,7 @@ public class QuotedPrintable implements Encoding {
*/
public String encode(String text) throws EncodingException {
try {
return encode( new StringBufferInputStream( text ) );
return encode( new ByteArrayInputStream( text.getBytes() ) );
}catch (IOException e) {
throw new EncodingException( "IOException occured." );
}