public interface Stream
| Modifier and Type | Field and Description |
|---|---|
static org.jruby.util.ByteList |
PARAGRAPH_DELIMETER |
static org.jruby.util.ByteList |
PARAGRAPH_SEPARATOR |
static int |
SEEK_CUR |
static int |
SEEK_END |
static int |
SEEK_SET |
| Modifier and Type | Method and Description |
|---|---|
int |
bufferedAvailable() |
void |
clearerr() |
void |
fclose() |
boolean |
feof()
Return true when at end of file (EOF).
|
int |
fflush() |
int |
fgetc() |
long |
fgetpos()
Get the current position within the file associated with this
handler.
|
org.jruby.util.ByteList |
fgets(org.jruby.util.ByteList separatorString) |
void |
fputc(int c) |
org.jruby.util.ByteList |
fread(int number) |
void |
freopen(Ruby runtime,
String path,
ModeFlags modes) |
void |
ftruncate(long newLength) |
int |
fwrite(org.jruby.util.ByteList string) |
ByteBuffer |
getBuffer() |
Channel |
getChannel() |
ChannelDescriptor |
getDescriptor() |
int |
getline(org.jruby.util.ByteList dst,
byte terminator)
Read all bytes up to and including a terminator byte.
|
int |
getline(org.jruby.util.ByteList dst,
byte terminator,
long limit)
Reads all bytes up to and including a terminator byte or until limit is reached.
|
ModeFlags |
getModes() |
boolean |
isAutoclose() |
boolean |
isBinmode() |
boolean |
isBlocking() |
boolean |
isSync() |
void |
lseek(long offset,
int type)
Perform a seek based on pos().
|
InputStream |
newInputStream() |
OutputStream |
newOutputStream() |
org.jruby.util.ByteList |
read(int number) |
org.jruby.util.ByteList |
readall() |
boolean |
readDataBuffered() |
int |
ready()
Implement IO#ready? as per io/wait in MRI.
|
int |
refillBuffer() |
void |
setAutoclose(boolean autoclose) |
void |
setBinmode() |
void |
setBlocking(boolean blocking) |
void |
setModes(ModeFlags modeFlags) |
void |
setSync(boolean sync) |
void |
sync()
Flush and sync all writes to the filesystem.
|
int |
ungetc(int c) |
void |
waitUntilReady()
Implement IO#wait as per io/wait in MRI.
|
boolean |
writeDataBuffered() |
static final int SEEK_SET
static final int SEEK_CUR
static final int SEEK_END
static final org.jruby.util.ByteList PARAGRAPH_DELIMETER
static final org.jruby.util.ByteList PARAGRAPH_SEPARATOR
ChannelDescriptor getDescriptor()
void clearerr()
ByteBuffer getBuffer()
ModeFlags getModes()
void setModes(ModeFlags modeFlags)
boolean isSync()
void setSync(boolean sync)
int bufferedAvailable()
int refillBuffer()
throws IOException
IOExceptionorg.jruby.util.ByteList fgets(org.jruby.util.ByteList separatorString)
throws IOException,
BadDescriptorException,
EOFException
org.jruby.util.ByteList readall()
throws IOException,
BadDescriptorException,
EOFException
int getline(org.jruby.util.ByteList dst,
byte terminator)
throws IOException,
BadDescriptorException
If the terminator byte is found, it will be the last byte in the output buffer.
dst - The output buffer.terminator - The byte to terminate reading.IOExceptionBadDescriptorExceptionint getline(org.jruby.util.ByteList dst,
byte terminator,
long limit)
throws IOException,
BadDescriptorException
If the terminator byte is found, it will be the last byte in the output buffer.
dst - The output buffer.terminator - The byte to terminate reading.limit - the number of bytes to read unless EOF or terminator is foundIOExceptionBadDescriptorExceptionorg.jruby.util.ByteList fread(int number)
throws IOException,
BadDescriptorException,
EOFException
int fwrite(org.jruby.util.ByteList string)
throws IOException,
BadDescriptorException
IOExceptionBadDescriptorExceptionint fgetc()
throws IOException,
BadDescriptorException,
EOFException
int ungetc(int c)
void fputc(int c)
throws IOException,
BadDescriptorException
IOExceptionBadDescriptorExceptionorg.jruby.util.ByteList read(int number)
throws IOException,
BadDescriptorException,
EOFException
void fclose()
throws IOException,
BadDescriptorException
IOExceptionBadDescriptorExceptionint fflush()
throws IOException,
BadDescriptorException
IOExceptionBadDescriptorExceptionvoid sync()
throws IOException,
BadDescriptorException
Flush and sync all writes to the filesystem.
IOException - if the sync does not workBadDescriptorExceptionboolean feof()
throws IOException,
BadDescriptorException
Return true when at end of file (EOF).
IOExceptionBadDescriptorExceptionlong fgetpos()
throws IOException,
PipeException,
BadDescriptorException,
InvalidValueException
Get the current position within the file associated with this handler.
IOExceptionPipeException - ESPIPE (illegal seek) when not a fileBadDescriptorExceptionInvalidValueExceptionvoid lseek(long offset,
int type)
throws IOException,
InvalidValueException,
PipeException,
BadDescriptorException
Perform a seek based on pos().
void ftruncate(long newLength)
throws IOException,
PipeException,
InvalidValueException,
BadDescriptorException
int ready()
throws IOException
IOExceptionvoid waitUntilReady()
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionboolean readDataBuffered()
boolean writeDataBuffered()
InputStream newInputStream()
OutputStream newOutputStream()
boolean isBlocking()
void setBlocking(boolean blocking)
throws IOException
IOExceptionvoid freopen(Ruby runtime, String path, ModeFlags modes) throws DirectoryAsFileException, IOException, InvalidValueException, PipeException, BadDescriptorException
void setBinmode()
boolean isBinmode()
Channel getChannel()
boolean isAutoclose()
void setAutoclose(boolean autoclose)
Copyright © 2001-2015 JRuby. All Rights Reserved.