-Added package-file for time.
-Modified susi javadoc to remove more warnings (and non-javadoc '@see' to base class).
This commit is contained in:
@ -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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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()
|
||||
{
|
||||
|
7
core/java/src/net/i2p/time/package.html
Normal file
7
core/java/src/net/i2p/time/package.html
Normal file
@ -0,0 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
<p>
|
||||
Provides classes for time synchronisation using NTP.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user