diff --git a/src/main/java/robaho/net/httpserver/ActivityTimer.java b/src/main/java/robaho/net/httpserver/ActivityTimer.java index 3d62e02..ca9f1e7 100644 --- a/src/main/java/robaho/net/httpserver/ActivityTimer.java +++ b/src/main/java/robaho/net/httpserver/ActivityTimer.java @@ -6,7 +6,7 @@ import java.util.Locale; import java.util.TimerTask; -class ActivityTimer { +final class ActivityTimer { private static volatile long now = System.currentTimeMillis(); private static volatile String dateAndTime = formatDate(); @@ -39,14 +39,14 @@ private static String formatDate() { return sb.toString(); } - public static long now() { + static long now() { return now; } /** * return the formatted current date and time suitable for use with the Date http header. this * is OK to cache since the resolution is only seconds, and we will update more often than that */ - public static String dateAndTime() { + static String dateAndTime() { return dateAndTime; } diff --git a/src/main/java/robaho/net/httpserver/NoSyncBufferedInputStream.java b/src/main/java/robaho/net/httpserver/NoSyncBufferedInputStream.java index 888c1bc..d6b3cd9 100644 --- a/src/main/java/robaho/net/httpserver/NoSyncBufferedInputStream.java +++ b/src/main/java/robaho/net/httpserver/NoSyncBufferedInputStream.java @@ -100,6 +100,7 @@ private void fill() throws IOException { * or an I/O error occurs. * @see java.io.FilterInputStream#in */ + @Override public int read() throws IOException { if (pos >= count) { fill(); @@ -167,6 +168,7 @@ private int read1(byte[] b, int off, int len) throws IOException { * or an I/O error occurs. * @throws IndexOutOfBoundsException {@inheritDoc} */ + @Override public int read(byte[] b, int off, int len) throws IOException { ensureOpen(); if ((off | len | (off + len) | (b.length - (off + len))) < 0) { @@ -199,6 +201,7 @@ public int read(byte[] b, int off, int len) throws IOException { * {@code in.skip(n)} throws an IOException, * or an I/O error occurs. */ + @Override public long skip(long n) throws IOException { ensureOpen(); if (n <= 0) { @@ -229,6 +232,7 @@ public long skip(long n) throws IOException { * invoking its {@link #close()} method, * or an I/O error occurs. */ + @Override public int available() throws IOException { if (in == null) throw new IOException("Stream closed"); @@ -248,6 +252,7 @@ public int available() throws IOException { * * @throws IOException if an I/O error occurs. */ + @Override public void close() throws IOException { if(buf!=null) { buf = null;