From: <pj...@us...> - 2009-08-29 17:54:24
|
Revision: 6724 http://jython.svn.sourceforge.net/jython/?rev=6724&view=rev Author: pjenvey Date: 2009-08-29 17:54:06 +0000 (Sat, 29 Aug 2009) Log Message: ----------- use @Override Modified Paths: -------------- trunk/jython/src/org/python/core/io/BinaryIOWrapper.java trunk/jython/src/org/python/core/io/BufferedIOMixin.java trunk/jython/src/org/python/core/io/BufferedRandom.java trunk/jython/src/org/python/core/io/BufferedReader.java trunk/jython/src/org/python/core/io/BufferedWriter.java trunk/jython/src/org/python/core/io/DatagramSocketIO.java trunk/jython/src/org/python/core/io/FileIO.java trunk/jython/src/org/python/core/io/LineBufferedRandom.java trunk/jython/src/org/python/core/io/LineBufferedWriter.java trunk/jython/src/org/python/core/io/RawIOBase.java trunk/jython/src/org/python/core/io/ServerSocketIO.java trunk/jython/src/org/python/core/io/SocketIO.java trunk/jython/src/org/python/core/io/SocketIOBase.java trunk/jython/src/org/python/core/io/StreamIO.java trunk/jython/src/org/python/core/io/TextIOBase.java trunk/jython/src/org/python/core/io/TextIOWrapper.java trunk/jython/src/org/python/core/io/UniversalIOWrapper.java Modified: trunk/jython/src/org/python/core/io/BinaryIOWrapper.java =================================================================== --- trunk/jython/src/org/python/core/io/BinaryIOWrapper.java 2009-08-26 10:33:22 UTC (rev 6723) +++ trunk/jython/src/org/python/core/io/BinaryIOWrapper.java 2009-08-29 17:54:06 UTC (rev 6724) @@ -22,7 +22,7 @@ super(bufferedIO); } - /** {@inheritDoc} */ + @Override public String read(int size) { if (size < 0) { return readall(); @@ -51,7 +51,7 @@ return StringUtil.fromBytes(data); } - /** {@inheritDoc} */ + @Override public String readall() { if (!readahead.hasRemaining()) { return StringUtil.fromBytes(bufferedIO.readall()); @@ -66,7 +66,7 @@ return StringUtil.fromBytes(all); } - /** {@inheritDoc} */ + @Override public String readline(int size) { // Avoid ByteBuffer (this.readahead) and StringBuilder // (this.builder) method calls in the inner loop by reading @@ -110,7 +110,7 @@ return drainBuilder(); } - /** {@inheritDoc} */ + @Override public int write(String buf) { if (readahead.hasRemaining()) { clearReadahead(); Modified: trunk/jython/src/org/python/core/io/BufferedIOMixin.java =================================================================== --- trunk/jython/src/org/python/core/io/BufferedIOMixin.java 2009-08-26 10:33:22 UTC (rev 6723) +++ trunk/jython/src/org/python/core/io/BufferedIOMixin.java 2009-08-29 17:54:06 UTC (rev 6724) @@ -44,27 +44,27 @@ this.bufferSize = bufferSize; } - /** {@inheritDoc} */ + @Override public long seek(long pos, int whence) { return rawIO.seek(pos, whence); } - /** {@inheritDoc} */ + @Override public long tell() { return rawIO.tell(); } - /** {@inheritDoc} */ + @Override public long truncate(long size) { return rawIO.truncate(size); } - /** {@inheritDoc} */ + @Override public void flush() { rawIO.flush(); } - /** {@inheritDoc} */ + @Override public void close() { if (closed()) { return; @@ -80,27 +80,27 @@ rawIO.close(); } - /** {@inheritDoc} */ + @Override public RawIOBase fileno() { return rawIO.fileno(); } - /** {@inheritDoc} */ + @Override public boolean isatty() { return rawIO.isatty(); } - /** {@inheritDoc} */ + @Override public boolean readable() { return rawIO.readable(); } - /** {@inheritDoc} */ + @Override public boolean writable() { return rawIO.writable(); } - /** {@inheritDoc} */ + @Override public boolean closed() { return rawIO.closed(); } Modified: trunk/jython/src/org/python/core/io/BufferedRandom.java =================================================================== --- trunk/jython/src/org/python/core/io/BufferedRandom.java 2009-08-26 10:33:22 UTC (rev 6723) +++ trunk/jython/src/org/python/core/io/BufferedRandom.java 2009-08-29 17:54:06 UTC (rev 6724) @@ -37,7 +37,7 @@ this.writer = new BufferedWriter(rawIO, bufferSize); } - /** {@inheritDoc} */ + @Override public long seek(long pos, int whence) { flush(); // First do the raw seek, then empty the read buffer, so that @@ -47,7 +47,7 @@ return pos; } - /** {@inheritDoc} */ + @Override public long tell() { if (writer.buffered()) { return writer.tell(); @@ -55,25 +55,25 @@ return reader.tell(); } - /** {@inheritDoc} */ + @Override public ByteBuffer read(int size) { flush(); return reader.read(size); } - /** {@inheritDoc} */ + @Override public ByteBuffer readall() { flush(); return reader.readall(); } - /** {@inheritDoc} */ + @Override public int readinto(ByteBuffer bytes) { flush(); return reader.readinto(bytes); } - /** {@inheritDoc} */ + @Override public int write(ByteBuffer bytes) { if (reader.buffered()) { reader.clear(); @@ -81,19 +81,19 @@ return writer.write(bytes); } - /** {@inheritDoc} */ + @Override public ByteBuffer peek(int size) { flush(); return reader.peek(size); } - /** {@inheritDoc} */ + @Override public int read1(ByteBuffer bytes) { flush(); return reader.read1(bytes); } - /** {@inheritDoc} */ + @Override public void flush() { writer.flush(); } Modified: trunk/jython/src/org/python/core/io/BufferedReader.java =================================================================== --- trunk/jython/src/org/python/core/io/BufferedReader.java 2009-08-26 10:33:22 UTC (rev 6723) +++ trunk/jython/src/org/python/core/io/BufferedReader.java 2009-08-29 17:54:06 UTC (rev 6724) @@ -27,7 +27,7 @@ clear(); } - /** {@inheritDoc} */ + @Override public int readinto(ByteBuffer bytes) { int size = bytes.remaining(); @@ -57,7 +57,7 @@ return (int)read; } - /** {@inheritDoc} */ + @Override public ByteBuffer readall() { ByteBuffer remaining = rawIO.readall(); @@ -73,7 +73,7 @@ return all; } - /** {@inheritDoc} */ + @Override public ByteBuffer peek(int size) { if (buffer.remaining() < Math.min(size, bufferSize)) { // Prepare to fill the buffer @@ -89,7 +89,7 @@ return buffer; } - /** {@inheritDoc} */ + @Override public int read1(ByteBuffer bytes) { int size = bytes.remaining(); if (size == 0) { @@ -106,12 +106,12 @@ return readinto(bytes); } - /** {@inheritDoc} */ + @Override public long tell() { return rawIO.tell() - buffer.remaining(); } - /** {@inheritDoc} */ + @Override public long seek(long pos, int whence) { if (whence == 1) { pos -= buffer.remaining(); @@ -121,17 +121,17 @@ return pos; } - /** {@inheritDoc} */ + @Override public boolean buffered() { return buffer.hasRemaining(); } - /** {@inheritDoc} */ + @Override public void clear() { buffer.clear().limit(0); } - /** {@inheritDoc} */ + @Override public int write(ByteBuffer bytes) { // Never writable; just raise the appropriate exception checkClosed(); @@ -139,7 +139,7 @@ return -1; } - /** {@inheritDoc} */ + @Override public boolean writable() { return false; } Modified: trunk/jython/src/org/python/core/io/BufferedWriter.java =================================================================== --- trunk/jython/src/org/python/core/io/BufferedWriter.java 2009-08-26 10:33:22 UTC (rev 6723) +++ trunk/jython/src/org/python/core/io/BufferedWriter.java 2009-08-29 17:54:06 UTC (rev 6724) @@ -26,7 +26,7 @@ buffer = ByteBuffer.allocate(this.bufferSize); } - /** {@inheritDoc} */ + @Override public int write(ByteBuffer bytes) { if (bufferSize == 0) { return rawIO.write(bytes); @@ -70,7 +70,7 @@ return totalToWrite; } - /** {@inheritDoc} */ + @Override public void flush() { if (buffer.position() > 0) { buffer.flip(); @@ -82,23 +82,23 @@ super.flush(); } - /** {@inheritDoc} */ + @Override public long tell() { return rawIO.tell() + buffer.position(); } - /** {@inheritDoc} */ + @Override public long seek(long pos, int whence) { flush(); return rawIO.seek(pos, whence); } - /** {@inheritDoc} */ + @Override public boolean buffered() { return buffer.position() > 0; } - /** {@inheritDoc} */ + @Override public ByteBuffer readall() { // Never readable; just raise the appropriate exception checkClosed(); @@ -106,7 +106,7 @@ return null; } - /** {@inheritDoc} */ + @Override public int readinto(ByteBuffer bytes) { // Never readable; just raise the appropriate exception checkClosed(); @@ -114,7 +114,7 @@ return -1; } - /** {@inheritDoc} */ + @Override public int read1(ByteBuffer bytes) { // Never readable; just raise the appropriate exception checkClosed(); @@ -122,7 +122,7 @@ return -1; } - /** {@inheritDoc} */ + @Override public boolean readable() { return false; } Modified: trunk/jython/src/org/python/core/io/DatagramSocketIO.java =================================================================== --- trunk/jython/src/org/python/core/io/DatagramSocketIO.java 2009-08-26 10:33:22 UTC (rev 6723) +++ trunk/jython/src/org/python/core/io/DatagramSocketIO.java 2009-08-29 17:54:06 UTC (rev 6724) @@ -29,7 +29,7 @@ this.socketChannel = socketChannel; } - /** {@inheritDoc} */ + @Override public int readinto(ByteBuffer buf) { checkClosed(); checkReadable(); @@ -57,7 +57,7 @@ } } - /** {@inheritDoc} */ + @Override public int write(ByteBuffer buf) { checkClosed(); checkWritable(); @@ -85,7 +85,7 @@ } } - /** {@inheritDoc} */ + @Override public void close() { if (closed()) { return; @@ -98,7 +98,7 @@ super.close(); } - /** {@inheritDoc} */ + @Override public Channel getChannel() { return socketChannel; } Modified: trunk/jython/src/org/python/core/io/FileIO.java =================================================================== --- trunk/jython/src/org/python/core/io/FileIO.java 2009-08-26 10:33:22 UTC (rev 6723) +++ trunk/jython/src/org/python/core/io/FileIO.java 2009-08-29 17:54:06 UTC (rev 6724) @@ -180,7 +180,7 @@ } } - /** {@inheritDoc} */ + @Override public boolean isatty() { checkClosed(); if (file == null) { @@ -193,7 +193,7 @@ } } - /** {@inheritDoc} */ + @Override public int readinto(ByteBuffer buf) { checkClosed(); checkReadable(); @@ -252,7 +252,7 @@ return all; } - /** {@inheritDoc} */ + @Override public int write(ByteBuffer buf) { checkClosed(); checkWritable(); @@ -280,7 +280,7 @@ } } - /** {@inheritDoc} */ + @Override public long seek(long pos, int whence) { checkClosed(); try { @@ -303,7 +303,7 @@ } } - /** {@inheritDoc} */ + @Override public long tell() { checkClosed(); try { @@ -313,7 +313,7 @@ } } - /** {@inheritDoc} */ + @Override public long truncate(long size) { checkClosed(); checkWritable(); @@ -328,7 +328,7 @@ return size; } - /** {@inheritDoc} */ + @Override public void close() { if (closed()) { return; @@ -351,17 +351,17 @@ return readable() ? Channels.newInputStream(fileChannel) : super.asInputStream(); } - /** {@inheritDoc} */ + @Override public boolean readable() { return reading || plus; } - /** {@inheritDoc} */ + @Override public boolean writable() { return writing; } - /** {@inheritDoc} */ + @Override public Channel getChannel() { return fileChannel; } Modified: trunk/jython/src/org/python/core/io/LineBufferedRandom.java =================================================================== --- trunk/jython/src/org/python/core/io/LineBufferedRandom.java 2009-08-26 10:33:22 UTC (rev 6723) +++ trunk/jython/src/org/python/core/io/LineBufferedRandom.java 2009-08-29 17:54:06 UTC (rev 6724) @@ -19,7 +19,7 @@ super(rawIO, 1); } - /** {@inheritDoc} */ + @Override protected void initChildBuffers() { // Line buffering is for output only this.reader = new BufferedReader(rawIO, 0); Modified: trunk/jython/src/org/python/core/io/LineBufferedWriter.java =================================================================== --- trunk/jython/src/org/python/core/io/LineBufferedWriter.java 2009-08-26 10:33:22 UTC (rev 6723) +++ trunk/jython/src/org/python/core/io/LineBufferedWriter.java 2009-08-29 17:54:06 UTC (rev 6724) @@ -21,7 +21,7 @@ buffer = ByteBuffer.allocate(DEFAULT_BUFFER_SIZE); } - /** {@inheritDoc} */ + @Override public int write(ByteBuffer bytes) { int size = bytes.remaining(); Modified: trunk/jython/src/org/python/core/io/RawIOBase.java =================================================================== --- trunk/jython/src/org/python/core/io/RawIOBase.java 2009-08-26 10:33:22 UTC (rev 6723) +++ trunk/jython/src/org/python/core/io/RawIOBase.java 2009-08-29 17:54:06 UTC (rev 6724) @@ -155,7 +155,7 @@ return count; } - /** {@inheritDoc} */ + @Override public RawIOBase fileno() { checkClosed(); return this; Modified: trunk/jython/src/org/python/core/io/ServerSocketIO.java =================================================================== --- trunk/jython/src/org/python/core/io/ServerSocketIO.java 2009-08-26 10:33:22 UTC (rev 6723) +++ trunk/jython/src/org/python/core/io/ServerSocketIO.java 2009-08-29 17:54:06 UTC (rev 6724) @@ -30,21 +30,21 @@ this.socketChannel = socketChannel; } - /** {@inheritDoc} */ + @Override public int readinto(ByteBuffer buf) { checkClosed(); checkReadable(); throw Py.IOError(Errno.ENOTCONN); } - /** {@inheritDoc} */ + @Override public int write(ByteBuffer buf) { checkClosed(); checkWritable(); throw Py.IOError(Errno.EBADF); } - /** {@inheritDoc} */ + @Override public void close() { if (closed()) { return; @@ -57,7 +57,7 @@ super.close(); } - /** {@inheritDoc} */ + @Override public Channel getChannel() { return socketChannel; } Modified: trunk/jython/src/org/python/core/io/SocketIO.java =================================================================== --- trunk/jython/src/org/python/core/io/SocketIO.java 2009-08-26 10:33:22 UTC (rev 6723) +++ trunk/jython/src/org/python/core/io/SocketIO.java 2009-08-29 17:54:06 UTC (rev 6724) @@ -29,7 +29,7 @@ this.socketChannel = socketChannel; } - /** {@inheritDoc} */ + @Override public int readinto(ByteBuffer buf) { checkClosed(); checkReadable(); @@ -57,7 +57,7 @@ } } - /** {@inheritDoc} */ + @Override public int write(ByteBuffer buf) { checkClosed(); checkWritable(); @@ -85,7 +85,7 @@ } } - /** {@inheritDoc} */ + @Override public void close() { if (closed()) { return; @@ -98,7 +98,7 @@ super.close(); } - /** {@inheritDoc} */ + @Override public Channel getChannel() { return socketChannel; } Modified: trunk/jython/src/org/python/core/io/SocketIOBase.java =================================================================== --- trunk/jython/src/org/python/core/io/SocketIOBase.java 2009-08-26 10:33:22 UTC (rev 6723) +++ trunk/jython/src/org/python/core/io/SocketIOBase.java 2009-08-29 17:54:06 UTC (rev 6724) @@ -45,12 +45,12 @@ } } - /** {@inheritDoc} */ + @Override public boolean readable() { return readable; } - /** {@inheritDoc} */ + @Override public boolean writable() { return writable; } Modified: trunk/jython/src/org/python/core/io/StreamIO.java =================================================================== --- trunk/jython/src/org/python/core/io/StreamIO.java 2009-08-26 10:33:22 UTC (rev 6723) +++ trunk/jython/src/org/python/core/io/StreamIO.java 2009-08-29 17:54:06 UTC (rev 6724) @@ -111,7 +111,7 @@ this.outputStream = outputStream; } - /** {@inheritDoc} */ + @Override public int readinto(ByteBuffer buf) { checkClosed(); checkReadable(); @@ -122,7 +122,7 @@ } } - /** {@inheritDoc} */ + @Override public int write(ByteBuffer buf) { checkClosed(); checkWritable(); @@ -133,7 +133,7 @@ } } - /** {@inheritDoc} */ + @Override public void flush() { if (outputStream == null) { return; @@ -145,7 +145,7 @@ } } - /** {@inheritDoc} */ + @Override public void close() { if (closed()) { return; @@ -217,7 +217,7 @@ return null; } - /** {@inheritDoc} */ + @Override public boolean isatty() { checkClosed(); @@ -234,12 +234,12 @@ return FileUtil.isatty(fd); } - /** {@inheritDoc} */ + @Override public boolean readable() { return readChannel != null; } - /** {@inheritDoc} */ + @Override public boolean writable() { return writeChannel != null; } @@ -266,7 +266,7 @@ return super.asInputStream(); } - /** {@inheritDoc} */ + @Override public Channel getChannel() { return readable() ? readChannel : writeChannel; } Modified: trunk/jython/src/org/python/core/io/TextIOBase.java =================================================================== --- trunk/jython/src/org/python/core/io/TextIOBase.java 2009-08-26 10:33:22 UTC (rev 6723) +++ trunk/jython/src/org/python/core/io/TextIOBase.java 2009-08-29 17:54:06 UTC (rev 6724) @@ -129,7 +129,7 @@ return -1; } - /** {@inheritDoc} */ + @Override public long truncate(long pos) { long initialPos = tell(); flush(); @@ -143,49 +143,49 @@ return pos; } - /** {@inheritDoc} */ + @Override public void flush() { bufferedIO.flush(); } - /** {@inheritDoc} */ + @Override public void close() { bufferedIO.close(); } - /** {@inheritDoc} */ + @Override public long seek(long pos, int whence) { pos = bufferedIO.seek(pos, whence); clearReadahead(); return pos; } - /** {@inheritDoc} */ + @Override public long tell() { return bufferedIO.tell() - readahead.remaining(); } - /** {@inheritDoc} */ + @Override public RawIOBase fileno() { return bufferedIO.fileno(); } - /** {@inheritDoc} */ + @Override public boolean isatty() { return bufferedIO.isatty(); } - /** {@inheritDoc} */ + @Override public boolean readable() { return bufferedIO.readable(); } - /** {@inheritDoc} */ + @Override public boolean writable() { return bufferedIO.writable(); } - /** {@inheritDoc} */ + @Override public boolean closed() { return bufferedIO.closed(); } Modified: trunk/jython/src/org/python/core/io/TextIOWrapper.java =================================================================== --- trunk/jython/src/org/python/core/io/TextIOWrapper.java 2009-08-26 10:33:22 UTC (rev 6723) +++ trunk/jython/src/org/python/core/io/TextIOWrapper.java 2009-08-29 17:54:06 UTC (rev 6724) @@ -37,7 +37,7 @@ newlineIsLF = newline.equals("\n"); } - /** {@inheritDoc} */ + @Override public String read(int size) { if (newlineIsLF) { return super.read(size); @@ -98,7 +98,7 @@ return new String(builderArray, 0, builderPos); } - /** {@inheritDoc} */ + @Override public String readall() { if (newlineIsLF) { return super.readall(); @@ -172,7 +172,7 @@ return destPos - destStartPos; } - /** {@inheritDoc} */ + @Override public String readline(int size) { if (newlineIsLF) { return super.readline(size); @@ -252,7 +252,7 @@ return drainBuilder(); } - /** {@inheritDoc} */ + @Override public int write(String buf) { if (!newlineIsLF) { buf = LF_PATTERN.matcher(buf).replaceAll(newline); Modified: trunk/jython/src/org/python/core/io/UniversalIOWrapper.java =================================================================== --- trunk/jython/src/org/python/core/io/UniversalIOWrapper.java 2009-08-26 10:33:22 UTC (rev 6723) +++ trunk/jython/src/org/python/core/io/UniversalIOWrapper.java 2009-08-29 17:54:06 UTC (rev 6724) @@ -33,7 +33,7 @@ super(bufferedIO); } - /** {@inheritDoc} */ + @Override public String read(int size) { if (size < 0) { return readall(); @@ -105,7 +105,7 @@ return new String(builderArray, 0, builderPos); } - /** {@inheritDoc} */ + @Override public String readall() { // Read the remainder of file ByteBuffer remaining = bufferedIO.readall(); @@ -179,7 +179,7 @@ return destPos - destStartPos; } - /** {@inheritDoc} */ + @Override public String readline(int size) { // Avoid ByteBuffer (this.readahead) and StringBuilder // (this.builder) method calls in the inner loop by reading @@ -268,7 +268,7 @@ return drainBuilder(); } - /** {@inheritDoc} */ + @Override public int write(String buf) { // Universal newlines doesn't support writing; just raise the // appropriate exception @@ -277,14 +277,14 @@ return -1; } - /** {@inheritDoc} */ + @Override public long seek(long pos, int whence) { pos = super.seek(pos, whence); skipNextLF = false; return pos; } - /** {@inheritDoc} */ + @Override public long tell() { long pos = super.tell(); if (skipNextLF) { @@ -305,7 +305,7 @@ return pos; } - /** {@inheritDoc} */ + @Override public PyObject getNewlines() { int size = newlineTypes.size(); if (size == 0) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |