org.jruby.util
Class IOHandlerJavaIO

java.lang.Object
  extended byorg.jruby.util.IOHandler
      extended byorg.jruby.util.IOHandlerJavaIO
Direct Known Subclasses:
IOHandlerProcess, IOHandlerSeekable, IOHandlerUnseekable

public abstract class IOHandlerJavaIO
extends IOHandler


Nested Class Summary
 
Nested classes inherited from class org.jruby.util.IOHandler
IOHandler.BadDescriptorException, IOHandler.InvalidValueException, IOHandler.PipeException
 
Field Summary
protected  int ungotc
           
 
Fields inherited from class org.jruby.util.IOHandler
fileno, isOpen, isSync, modes, PARAGRAPH_DELIMETER, SEEK_CUR, SEEK_END, SEEK_SET
 
Constructor Summary
protected IOHandlerJavaIO(Ruby runtime)
           
 
Method Summary
 int getc()
           
abstract  java.io.InputStream getInputStream()
           
abstract  java.io.OutputStream getOutputStream()
           
 ByteList gets(ByteList separatorString)
           
 ByteList getsEntireStream()
           
 void putc(int c)
           
 int read()
           
 ByteList read(int number)
           
 int ready()
          Implement IO#ready? as per io/wait in MRI.
abstract  int sysread()
           
protected  int sysread(ByteList buf, int length)
           
 ByteList sysread(int number)
           
 void ungetc(int c)
           
 int write(ByteList string)
           
 
Methods inherited from class org.jruby.util.IOHandler
checkOpen, checkPermissionsSubsetOf, checkReadable, checkWritable, checkWriteable, cloneIOHandler, close, flush, getFileChannel, getFileno, getModes, getRuntime, hasPendingBuffered, isEOF, isOpen, isReadable, isSync, isWriteable, pid, pos, reset, resetByModes, rewind, seek, setFileno, setIsSync, sync, syswrite, syswrite, truncate, waitUntilReady
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ungotc

protected int ungotc
Constructor Detail

IOHandlerJavaIO

protected IOHandlerJavaIO(Ruby runtime)
Method Detail

gets

public ByteList gets(ByteList separatorString)
              throws java.io.IOException,
                     IOHandler.BadDescriptorException
Specified by:
gets in class IOHandler
Throws:
java.io.IOException
IOHandler.BadDescriptorException

getsEntireStream

public ByteList getsEntireStream()
                          throws java.io.IOException
Specified by:
getsEntireStream in class IOHandler
Throws:
java.io.IOException

read

public int read()
         throws java.io.IOException
Throws:
java.io.IOException

getc

public int getc()
         throws java.io.IOException,
                IOHandler.BadDescriptorException
Specified by:
getc in class IOHandler
Throws:
java.io.IOException
IOHandler.BadDescriptorException

read

public ByteList read(int number)
              throws java.io.IOException,
                     IOHandler.BadDescriptorException
Specified by:
read in class IOHandler
Throws:
java.io.IOException
IOHandler.BadDescriptorException

ungetc

public void ungetc(int c)
Specified by:
ungetc in class IOHandler

putc

public void putc(int c)
          throws java.io.IOException,
                 IOHandler.BadDescriptorException
Specified by:
putc in class IOHandler
Throws:
java.io.IOException
IOHandler.BadDescriptorException

write

public int write(ByteList string)
          throws java.io.IOException,
                 IOHandler.BadDescriptorException
Specified by:
write in class IOHandler
Throws:
java.io.IOException
IOHandler.BadDescriptorException

sysread

protected int sysread(ByteList buf,
                      int length)
               throws java.io.IOException
Throws:
java.io.IOException

sysread

public ByteList sysread(int number)
                 throws java.io.IOException,
                        IOHandler.BadDescriptorException
Specified by:
sysread in class IOHandler
Throws:
java.io.IOException
IOHandler.BadDescriptorException

sysread

public abstract int sysread()
                     throws java.io.IOException
Throws:
java.io.IOException

getInputStream

public abstract java.io.InputStream getInputStream()

getOutputStream

public abstract java.io.OutputStream getOutputStream()

ready

public int ready()
          throws java.io.IOException
Description copied from class: IOHandler
Implement IO#ready? as per io/wait in MRI. returns non-nil if input available without blocking, or nil.

Specified by:
ready in class IOHandler
Throws:
java.io.IOException


Copyright © 2002-2007 JRuby Team. All Rights Reserved.