-Added package-file for time.

-Modified susi javadoc to remove more warnings (and non-javadoc '@see' to base class).
This commit is contained in:
mathiasdm
2010-10-14 16:05:06 +00:00
parent 8cda5104e3
commit 3daa6b964d
4 changed files with 28 additions and 21 deletions

View File

@ -42,7 +42,7 @@ public class Base64 implements Encoding {
return "base64";
}
/**
* @return
* @return Base64-encoded String.
* @throws EncodingException
*/
public String encode( byte in[] ) throws EncodingException
@ -53,8 +53,8 @@ public class Base64 implements Encoding {
throw new EncodingException( e.getMessage() );
}
}
/* (non-Javadoc)
* @see i2p.susi23.util.Encoding#encode(java.lang.String)
/**
* @see Base64#encode(byte[])
*/
public String encode(String str) throws EncodingException {
try {
@ -66,7 +66,7 @@ public class Base64 implements Encoding {
/**
*
* @param in
* @return
* @see Base64#encode(String)
*/
private String encode( InputStream in ) throws IOException, EncodingException
{
@ -116,7 +116,7 @@ public class Base64 implements Encoding {
/**
* @param b
* @return
* @return Encoded single byte.
*/
private static int encodeByte(int b) {
/*
@ -173,21 +173,21 @@ public class Base64 implements Encoding {
/**
* @param text
* @return
* @return Buffer containing a decoded String.
*/
public ReadBuffer decode(String text) throws DecodingException {
return text != null ? decode( text.getBytes() ) : null;
}
/* (non-Javadoc)
* @see i2p.susi23.util.Encoding#decode(byte[])
/**
* @see Base64#decode(String)
*/
public ReadBuffer decode(byte[] in) throws DecodingException {
return decode( in, 0, in.length );
}
/* (non-Javadoc)
* @see i2p.susi23.util.Encoding#decode(byte[], int, int)
/**
* @see Base64#decode(String)
*/
public ReadBuffer decode(byte[] in, int offset, int length) throws DecodingException {
byte out[] = new byte[length * 3 / 4 + 1 ];
@ -228,10 +228,10 @@ public class Base64 implements Encoding {
return readBuffer;
}
/* (non-Javadoc)
* @see i2p.susi23.util.Encoding#decode(i2p.susi23.util.ReadBuffer)
/*
* @see Base64#decode(String)
*/
public ReadBuffer decode(ReadBuffer in) throws DecodingException {
return decode( in.content, in.offset, in.length );
}
}
}

View File

@ -35,21 +35,21 @@ public interface Encoding {
/**
*
* @param in
* @return
* @return Encoded string.
* @throws EncodingException
*/
public String encode( byte in[] ) throws EncodingException;
/**
*
* @param str
* @return
* @see Encoding#encode(byte[])
* @throws EncodingException
*/
public String encode( String str ) throws EncodingException;
/**
*
* @param in
* @return
* @see Encoding#decode(byte[], int, int)
* @throws DecodingException
*/
public ReadBuffer decode( byte in[] ) throws DecodingException;
@ -58,21 +58,21 @@ public interface Encoding {
* @param in
* @param offset
* @param length
* @return
* @return Output buffer containing decoded String.
* @throws DecodingException
*/
public ReadBuffer decode( byte in[], int offset, int length ) throws DecodingException;
/**
*
* @param str
* @return
* @see Encoding#decode(byte[], int, int)
* @throws DecodingException
*/
public ReadBuffer decode( String str ) throws DecodingException;
/**
*
* @param in
* @return
* @see Encoding#decode(byte[], int, int)
* @throws DecodingException
*/
public ReadBuffer decode( ReadBuffer in ) throws DecodingException;

View File

@ -62,7 +62,7 @@ public class EncodingFactory {
*
* @param name name of encoding (e.g. quoted-printable)
*
* @return
* @return Encoder instance
*/
public static Encoding getEncoding( String name )
{
@ -71,7 +71,7 @@ public class EncodingFactory {
/**
* Returns list of available encodings;
*
* @return
* @return List of encodings
*/
public static Set availableEncodings()
{

View File

@ -0,0 +1,7 @@
<html>
<body>
<p>
Provides classes for time synchronisation using NTP.
</p>
</body>
</html>