|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jruby.util.IOHandler
org.jruby.util.IOHandlerJavaIO
org.jruby.util.IOHandlerProcess
public class IOHandlerProcess
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.jruby.util.IOHandler |
|---|
IOHandler.BadDescriptorException, IOHandler.InvalidValueException, IOHandler.PipeException |
| Field Summary | |
|---|---|
protected java.io.InputStream |
input
|
protected java.io.OutputStream |
output
|
protected java.lang.Process |
process
|
| Fields inherited from class org.jruby.util.IOHandlerJavaIO |
|---|
ungotc |
| Fields inherited from class org.jruby.util.IOHandler |
|---|
fileno, isOpen, isSync, modes, PARAGRAPH_DELIMETER, SEEK_CUR, SEEK_END, SEEK_SET |
| Constructor Summary | |
|---|---|
IOHandlerProcess(Ruby runtime,
java.lang.Process process,
IOModes modes)
|
|
| Method Summary | |
|---|---|
IOHandler |
cloneIOHandler()
|
void |
close()
Close IO handler resources. |
void |
flush()
|
java.nio.channels.FileChannel |
getFileChannel()
|
java.io.InputStream |
getInputStream()
|
java.io.OutputStream |
getOutputStream()
|
boolean |
isEOF()
Return true when at end of file (EOF). |
int |
pid()
Get the process ID associated with this handler. |
long |
pos()
Get the current position within the file associated with this handler. |
void |
resetByModes(IOModes newModes)
|
void |
rewind()
|
void |
seek(long offset,
int type)
Perform a seek based on pos(). |
void |
sync()
Flush and sync all writes to the filesystem. |
int |
sysread()
|
ByteList |
sysread(int number)
|
int |
syswrite(ByteList buf)
|
int |
syswrite(int c)
|
void |
truncate(long newLength)
|
| Methods inherited from class org.jruby.util.IOHandlerJavaIO |
|---|
getc, gets, getsEntireStream, putc, read, read, ready, sysread, ungetc, write |
| Methods inherited from class org.jruby.util.IOHandler |
|---|
checkOpen, checkPermissionsSubsetOf, checkReadable, checkWritable, checkWriteable, getFileno, getModes, getRuntime, hasPendingBuffered, isOpen, isReadable, isSync, isWriteable, reset, setFileno, setIsSync, waitUntilReady |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.io.InputStream input
protected java.io.OutputStream output
protected java.lang.Process process
| Constructor Detail |
|---|
public IOHandlerProcess(Ruby runtime,
java.lang.Process process,
IOModes modes)
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
public IOHandler cloneIOHandler()
throws java.io.IOException
cloneIOHandler in class IOHandlerjava.io.IOException
public void close()
throws java.io.IOException,
IOHandler.BadDescriptorException
Close IO handler resources.
close in class IOHandlerjava.io.IOException
BadDescriptorException
IOHandler.BadDescriptorExceptionIOHandler.close()
public void flush()
throws java.io.IOException,
IOHandler.BadDescriptorException
flush in class IOHandlerjava.io.IOException
BadDescriptorException
IOHandler.BadDescriptorExceptionIOHandler.flush()public java.io.InputStream getInputStream()
getInputStream in class IOHandlerJavaIOorg.jruby.util.IOHandler#getInputStream()public java.io.OutputStream getOutputStream()
getOutputStream in class IOHandlerJavaIOorg.jruby.util.IOHandler#getOutputStream()
public boolean isEOF()
throws java.io.IOException,
IOHandler.BadDescriptorException
IOHandlerReturn true when at end of file (EOF).
isEOF in class IOHandlerjava.io.IOException
BadDescriptorException
IOHandler.BadDescriptorExceptionIOHandler.isEOF()public int pid()
IOHandlerGet the process ID associated with this handler.
pid in class IOHandlerIOHandler.pid()
public long pos()
throws IOHandler.PipeException
IOHandlerGet the current position within the file associated with this handler.
pos in class IOHandlerPipeException
IOHandler.PipeExceptionIOHandler.pos()public void resetByModes(IOModes newModes)
resetByModes in class IOHandler
public void rewind()
throws IOHandler.PipeException
rewind in class IOHandlerPipeException
IOHandler.PipeExceptionIOHandler.rewind()
public void seek(long offset,
int type)
throws IOHandler.PipeException
IOHandlerPerform a seek based on pos().
seek in class IOHandlerPipeException
IOHandler.PipeExceptionIOHandler.seek(long, int)
public void sync()
throws java.io.IOException
IOHandlerFlush and sync all writes to the filesystem.
sync in class IOHandlerjava.io.IOException - if the sync does not workIOHandler.sync()
public int sysread()
throws java.io.IOException
sysread in class IOHandlerJavaIOjava.io.IOExceptionorg.jruby.util.IOHandler#sysread()
public ByteList sysread(int number)
throws java.io.IOException,
IOHandler.BadDescriptorException
sysread in class IOHandlerJavaIOjava.io.IOException
IOHandler.BadDescriptorException
public int syswrite(ByteList buf)
throws java.io.IOException,
IOHandler.BadDescriptorException
syswrite in class IOHandlerjava.io.IOException
BadDescriptorException
IOHandler.BadDescriptorExceptionorg.jruby.util.IOHandler#syswrite(String buf)
public int syswrite(int c)
throws java.io.IOException,
IOHandler.BadDescriptorException
syswrite in class IOHandlerjava.io.IOException
BadDescriptorException
IOHandler.BadDescriptorExceptionorg.jruby.util.IOHandler#syswrite(String buf)
public void truncate(long newLength)
throws java.io.IOException,
IOHandler.PipeException
truncate in class IOHandlerjava.io.IOException
IOHandler.PipeExceptionpublic java.nio.channels.FileChannel getFileChannel()
getFileChannel in class IOHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||