Top Description Fields Constructors Methods
org.python.core.io

public Class BinaryIOWrapper

extends TextIOBase
Class Inheritance
Known Direct Subclasses
org.python.core.io.TextIOWrapper
Imports
java.nio.ByteBuffer, org.python.core.util.StringUtil

A Buffered text stream in binary mode.
Author
Philip Jenvey

Field Summary

Inherited from org.python.core.io.TextIOBase:
bufferedIObuilderCHUNK_SIZECR_BYTEinterimBuilderreadahead

Constructor Summary

AccessConstructor and Description
public
BinaryIOWrapper(BufferedIOBase bufferedIO)

Contruct a TextIOBase in binary mode, wrapping the given BufferedIOBase.

Method Summary

Modifier and TypeMethod and Description
public String
read(int
the number of bytes to read
size
)

Overrides org.python.core.io.TextIOBase.read.

Read and return up to size bytes, contained in a String.

public String
readall()

Overrides org.python.core.io.TextIOBase.readall.

Read until EOF.

public String
readline(int
the number of bytes to read
size
)

Overrides org.python.core.io.TextIOBase.readline.

Read until size, newline or EOF.

public int
write(String
a String value
buf
)

Overrides org.python.core.io.TextIOBase.write.

Write the given String to the IO stream.

Inherited from org.python.core.io.TextIOBase:
asInputStreamasOutputStreamatEOFclearReadaheadclosecloseddrainBuilderfilenoflushgetNewlinesisattypackReadaheadreadablereadChunkreadChunkreadintoseektelltruncatewritable

Constructor Detail

BinaryIOWrapperback to summary
public BinaryIOWrapper(BufferedIOBase bufferedIO)

Contruct a TextIOBase in binary mode, wrapping the given BufferedIOBase.

Method Detail

readback to summary
public String read(int size)

Overrides org.python.core.io.TextIOBase.read.

Doc from org.python.core.io.TextIOBase.read.

Read and return up to size bytes, contained in a String. Returns an empty String on EOF

Parameters
size:int

the number of bytes to read

Returns:String

a String containing the bytes read

Annotations
@Override
readallback to summary
public String readall()

Overrides org.python.core.io.TextIOBase.readall.

Doc from org.python.core.io.TextIOBase.readall.

Read until EOF.

Returns:String

a String containing the bytes read

Annotations
@Override
readlineback to summary
public String readline(int size)

Overrides org.python.core.io.TextIOBase.readline.

Doc from org.python.core.io.TextIOBase.readline.

Read until size, newline or EOF. Returns an empty string if EOF is hit immediately.

Parameters
size:int

the number of bytes to read

Returns:String

a String containing the bytes read

Annotations
@Override
writeback to summary
public int write(String buf)

Overrides org.python.core.io.TextIOBase.write.

Doc from org.python.core.io.TextIOBase.write.

Write the given String to the IO stream. Returns the number of characters written.

Parameters
buf:String

a String value

Returns:int

the number of characters written as an int

Annotations
@Override