Пример #1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public int readBytes(java.nio.channels.GatheringByteChannel out, int length) throws java.io.IOException
        public override int ReadBytes(GatheringByteChannel @out, int length)
        {
            sbyte[] array = new sbyte[length];
            try
            {
                @delegate.Get(array, length);
                return(@out.write(ByteBuffer.wrap(array)));
            }
            catch (ReadPastEndException e)
            {
                throw OutOfBounds(e);
            }
        }
Пример #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public int getBytes(int index, java.nio.channels.GatheringByteChannel out, int length) throws java.io.IOException
        public override int GetBytes(int index, GatheringByteChannel @out, int length)
        {
            int pos = @delegate.PositionReader(index);

            try
            {
                return(ReadBytes(@out, length));
            }
            finally
            {
                @delegate.PositionReader(pos);
            }
        }
Пример #3
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public int readBytes(java.nio.channels.GatheringByteChannel out, int length) throws java.io.IOException
        public override int ReadBytes(GatheringByteChannel @out, int length)
        {
            return(_buffer.readBytes(@out, length));
        }
Пример #4
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public int getBytes(int index, java.nio.channels.GatheringByteChannel out, int length) throws java.io.IOException
        public override int GetBytes(int index, GatheringByteChannel @out, int length)
        {
            return(_buffer.getBytes(index, @out, length));
        }
Пример #5
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public int readBytes(java.nio.channels.GatheringByteChannel out, int length) throws java.io.IOException
        public override int ReadBytes(GatheringByteChannel @out, int length)
        {
            ReadNextChunkIfNeeded(length);
            return(_buffer.readBytes(@out, length));
        }
Пример #6
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public int getBytes(int index, java.nio.channels.GatheringByteChannel out, int length) throws java.io.IOException
        public override int GetBytes(int index, GatheringByteChannel @out, int length)
        {
            // TODO We need a loop for this (if dst is bigger than chunk size)
            ReadNextChunkIfNeeded(length);
            return(_buffer.getBytes(index, @out, length));
        }