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 |
---|---|
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) |
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.
|
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()
ModeFlags getModes()
void setModes(ModeFlags modeFlags)
boolean isSync()
void setSync(boolean sync)
org.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.IOException
BadDescriptorException
int 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 foundIOException
BadDescriptorException
org.jruby.util.ByteList fread(int number) throws IOException, BadDescriptorException, EOFException
int fwrite(org.jruby.util.ByteList string) throws IOException, BadDescriptorException
IOException
BadDescriptorException
int fgetc() throws IOException, BadDescriptorException, EOFException
int ungetc(int c)
void fputc(int c) throws IOException, BadDescriptorException
IOException
BadDescriptorException
org.jruby.util.ByteList read(int number) throws IOException, BadDescriptorException, EOFException
void fclose() throws IOException, BadDescriptorException
IOException
BadDescriptorException
int fflush() throws IOException, BadDescriptorException
IOException
BadDescriptorException
void sync() throws IOException, BadDescriptorException
Flush and sync all writes to the filesystem.
IOException
- if the sync does not workBadDescriptorException
boolean feof() throws IOException, BadDescriptorException
Return true when at end of file (EOF).
IOException
BadDescriptorException
long fgetpos() throws IOException, PipeException, BadDescriptorException, InvalidValueException
Get the current position within the file associated with this handler.
IOException
PipeException
- ESPIPE (illegal seek) when not a fileBadDescriptorException
InvalidValueException
void 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
IOException
void waitUntilReady() throws IOException, InterruptedException
IOException
InterruptedException
boolean readDataBuffered()
boolean writeDataBuffered()
InputStream newInputStream()
OutputStream newOutputStream()
boolean isBlocking()
void setBlocking(boolean blocking) throws IOException
IOException
void 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-2013 JRuby. All Rights Reserved.