|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.python.core.PyObject
org.python.core.PyIterator
org.python.modules.cStringIO.StringIO
public static class cStringIO.StringIO
The StringIO object
cStringIO.StringIO()
,
cStringIO.StringIO(String)
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class org.python.core.PyObject |
---|
PyObject.ConversionException |
Field Summary | |
---|---|
boolean |
closed
|
int |
pos
|
boolean |
softspace
|
Fields inherited from class org.python.core.PyIterator |
---|
__doc__next |
Fields inherited from class org.python.core.PyObject |
---|
TYPE |
Constructor Summary | |
---|---|
cStringIO.StringIO()
|
|
cStringIO.StringIO(String buffer)
|
Method Summary | |
---|---|
PyObject |
__iternext__()
Return the next element of the sequence that this is an iterator for. |
void |
__setattr__(String name,
PyObject value)
A variant of the __setattr__ method which accepts a String as the key. |
void |
close()
Free the memory buffer. |
void |
flush()
Flush the internal buffer. |
PyString |
getvalue()
Retrieve the entire contents of the ``file'' at any time before the StringIO object's close() method is called. |
boolean |
isatty()
Return false. |
PyString |
read()
Read all data until EOF is reached. |
PyString |
read(long size)
Read at most size bytes from the file (less if the read hits EOF). |
PyString |
readline()
Read one entire line from the file. |
PyString |
readline(long size)
Read one entire line from the file. |
PyString |
readlineNoNl()
Read and return a line without the trailing newline. |
PyObject |
readlines()
Read until EOF using readline() and return a list containing the lines thus read. |
PyObject |
readlines(long sizehint)
Read until EOF using readline() and return a list containing the lines thus read. |
void |
reset()
Reset the file position to the beginning of the file. |
void |
seek(long pos)
Position the file pointer to the absolute position. |
void |
seek(long pos,
int mode)
Position the file pointer to the position in the . |
int |
tell()
Return the file position. |
void |
truncate()
truncate the file at the current position. |
void |
truncate(long pos)
truncate the file at the position pos. |
void |
write(PyObject obj)
Write a string to the file. |
void |
write(String s)
|
void |
writeChar(char ch)
Write a char to the file. |
void |
writelines(PyObject lines)
Write a list of strings to the file. |
Methods inherited from class org.python.core.PyIterator |
---|
__iter__, iterator, next |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public boolean softspace
public boolean closed
public int pos
Constructor Detail |
---|
public cStringIO.StringIO()
public cStringIO.StringIO(String buffer)
Method Detail |
---|
public void __setattr__(String name, PyObject value)
PyObject
__setattr__
in class PyObject
name
- the name whose value will be set -
must be an interned string .value
- the value to set this name toPyObject.__setattr__(PyString, PyObject)
public PyObject __iternext__()
PyObject
__iternext__
in class PyIterator
public void close()
public boolean isatty()
public void seek(long pos)
pos
- the position in the file.public void seek(long pos, int mode)
pos
- the position in the file.mode
- 0=from the start, 1=relative, 2=from the end.public void reset()
public int tell()
public PyString read()
public PyString read(long size)
size
- the number of characters to read.
public PyString readline()
public PyString readline(long size)
public PyString readlineNoNl()
public PyObject readlines()
public PyObject readlines(long sizehint)
public void truncate()
public void truncate(long pos)
public void write(PyObject obj)
obj
- The data to write.public void write(String s)
public void writeChar(char ch)
ch
- The data to write.public void writelines(PyObject lines)
public void flush()
public PyString getvalue()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |