org.jcodec.common
Class FileChannelWrapper

java.lang.Object
  extended by org.jcodec.common.FileChannelWrapper
All Implemented Interfaces:
Closeable, ByteChannel, Channel, ReadableByteChannel, WritableByteChannel, SeekableByteChannel

public class FileChannelWrapper
extends Object
implements SeekableByteChannel

This class is part of JCodec ( www.jcodec.org ) This software is distributed under FreeBSD License

Author:
Jay Codec

Constructor Summary
FileChannelWrapper(FileChannel ch)
           
 
Method Summary
 void close()
           
 boolean isOpen()
           
 long position()
           
 SeekableByteChannel position(long newPosition)
           
 int read(ByteBuffer arg0)
           
 long size()
           
 SeekableByteChannel truncate(long size)
           
 int write(ByteBuffer arg0)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileChannelWrapper

public FileChannelWrapper(FileChannel ch)
                   throws FileNotFoundException
Throws:
FileNotFoundException
Method Detail

read

public int read(ByteBuffer arg0)
         throws IOException
Specified by:
read in interface ReadableByteChannel
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Specified by:
close in interface Channel
Throws:
IOException

isOpen

public boolean isOpen()
Specified by:
isOpen in interface Channel

write

public int write(ByteBuffer arg0)
          throws IOException
Specified by:
write in interface WritableByteChannel
Throws:
IOException

position

public long position()
              throws IOException
Specified by:
position in interface SeekableByteChannel
Throws:
IOException

position

public SeekableByteChannel position(long newPosition)
                             throws IOException
Specified by:
position in interface SeekableByteChannel
Throws:
IOException

size

public long size()
          throws IOException
Specified by:
size in interface SeekableByteChannel
Throws:
IOException

truncate

public SeekableByteChannel truncate(long size)
                             throws IOException
Specified by:
truncate in interface SeekableByteChannel
Throws:
IOException


Copyright © 2013. All Rights Reserved.