Top Inners Fields Constructors Methods
org.jruby.ext.zlib

public Class JZlibRubyGzipReader

extends RubyGzipFile
Class Inheritance
Annotations
@JRubyClass
name:Zlib::GzipReader
parent:Zlib::GzipFile
include:Enumerable
Imports
com.jcraft.jzlib.GZIPException, .GZIPInputStream, .Inflater, org.jruby.Ruby, .RubyBasicObject, .RubyClass, .RubyEnumerator, .RubyException, .RubyInteger, .RubyNumeric, .RubyString, org.jruby.anno.FrameField, .JRubyClass, .JRubyMethod, org.jruby.exceptions.RaiseException, org.jruby.runtime.Arity, .Block, .Helpers, .ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.util.ByteList, .IOInputStream, .StringSupport, .TypeConverter, org.jruby.util.io.EncodingUtils, .PosixShim, java.io.BufferedInputStream, .IOException, .PushbackInputStream, java.util.ArrayList, .List

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private static final int
private PushbackInputStream
private GZIPInputStream
private IOInputStream
private int
private static final int
private long
Inherited from org.jruby.ext.zlib.RubyGzipFile:
closedececflagsecoptsencenc2finishedhasBOMlevelmtimenullFreeCommentnullFreeOrigNameosCodereadTranscoderrealIosyncwriteTranscoder

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject
each(ThreadContext context, IRubyObject[] args, Block block)

public IRubyObject
each_byte(ThreadContext context, Block block)

public IRubyObject
each_char(ThreadContext context, Block block)

public IRubyObject
each_line(ThreadContext context, IRubyObject[] args, Block block)

public IRubyObject
eof()
Deprecated since 10.0.

public IRubyObject
eof(ThreadContext context)

public IRubyObject
eof_p()
Deprecated since 10.0.

public IRubyObject
private void
public IRubyObject
public IRubyObject
getbyte()
Deprecated

public IRubyObject
getc()
Deprecated

public IRubyObject
public IRubyObject
gets(ThreadContext context, IRubyObject[] args)

public IRubyObject
public IRubyObject
private IRubyObject
private long

Returns:

number of bytes
internalPosition
()

Get position within this stream including that has been read by users calling read + what jzlib may have speculatively read in because of buffering.

private IRubyObject
private IRubyObject
internalSepGets(ThreadContext context, ByteList sep, int limit)

private boolean
public IRubyObject
public IRubyObject
lineno()
Deprecated

public static IRubyObject
newInstance(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block)

public static JZlibRubyGzipReader
newInstance(IRubyObject recv, IRubyObject[] args)
Deprecated since 10.0.

public static JZlibRubyGzipReader
private ByteList
private ByteList
newReadByteList(int size)

public static IRubyObject
open(final ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block)

public IRubyObject
public IRubyObject
public IRubyObject
pos()
Deprecated since 10.0.

public IRubyObject
pos(ThreadContext context)

public IRubyObject
read(ThreadContext context, IRubyObject[] args)

private RubyString
private RubyString
readAll(ThreadContext context, int limit)

public IRubyObject
readbyte()
Deprecated

public IRubyObject
public IRubyObject
readchar()
Deprecated

public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject
readpartial(IRubyObject[] args)
Deprecated

public IRubyObject
private IRubyObject
readPartial(ThreadContext context, int len, RubyString outbuf)

private ByteList
readSize(int length)

public IRubyObject
public IRubyObject
set_lineno(IRubyObject lineArg)
Deprecated since 10.0.

public IRubyObject
private void
public IRubyObject
ungetbyte(IRubyObject b)
Deprecated since 10.0.

public IRubyObject
public IRubyObject
public IRubyObject
unused()
Deprecated since 10.0.

public IRubyObject
public static IRubyObject
zcat(ThreadContext context, IRubyObject klass, IRubyObject[] args, Block block)

Document-method: Zlib::GzipReader.zcat call-seq: Zlib::GzipReader.zcat(io, options = {}, &block) => nil Zlib::GzipReader.zcat(io, options = {}) => string Decompresses all gzip data in the +io+, handling multiple gzip streams until the end of the +io+.

Inherited from org.jruby.ext.zlib.RubyGzipFile:
closeclosed_pclosed_pcommentcrcecoptsfinishfinishgetBOMgetEcflagsgetEcoptsgetEncgetEnc2getInternalEncodinggetReadEncodinggetReadEncodingisClosedlevellevelmtimenewInstancenewInstancenewStrnewStrorig_nameos_codepathrespond_torespond_toset_syncset_syncsetBOMsetEcflagssetEcoptssetEncsetEnc2syncsyncto_ioto_iowrapwrapwrap19wrapBlock

Field Detail

BUFF_SIZEback to summary
private static final int BUFF_SIZE
bufferedStreamback to summary
private PushbackInputStream bufferedStream
ioback to summary
private GZIPInputStream io
ioInputStreamback to summary
private IOInputStream ioInputStream
lineback to summary
private int line
NEWLINEback to summary
private static final int NEWLINE
positionback to summary
private long position

Constructor Detail

JZlibRubyGzipReaderback to summary
public JZlibRubyGzipReader(Ruby runtime, RubyClass type)

Method Detail

closeback to summary
public IRubyObject close(ThreadContext context)

Overrides org.jruby.ext.zlib.RubyGzipFile.close.

Annotations
@Override
@JRubyMethod
name:close
commentback to summary
public IRubyObject comment(ThreadContext context)

Overrides org.jruby.ext.zlib.RubyGzipFile.comment.

Annotations
@Override
@JRubyMethod
crcback to summary
public IRubyObject crc(ThreadContext context)

Overrides org.jruby.ext.zlib.RubyGzipFile.crc.

Annotations
@Override
@JRubyMethod
eachback to summary
public IRubyObject each(ThreadContext context, IRubyObject[] args, Block block)
Annotations
@JRubyMethod
optional:1
checkArity:false
each_byteback to summary
public IRubyObject each_byte(ThreadContext context, Block block)
Annotations
@JRubyMethod
each_charback to summary
public IRubyObject each_char(ThreadContext context, Block block)
Annotations
@JRubyMethod
each_lineback to summary
public IRubyObject each_line(ThreadContext context, IRubyObject[] args, Block block)
Annotations
@JRubyMethod
optional:1
checkArity:false
eofback to summary
public IRubyObject eof()

Deprecated

since 10.0.

Annotations
@Deprecated
since:10.0
eofback to summary
public IRubyObject eof(ThreadContext context)
Annotations
@JRubyMethod
name:eof
eof_pback to summary
public IRubyObject eof_p()

Deprecated

since 10.0.

Annotations
@Deprecated
since:10.0
eof_pback to summary
public IRubyObject eof_p(ThreadContext context)
Annotations
@JRubyMethod
name:eof?
fixBrokenTrailingCharacterback to summary
private void fixBrokenTrailingCharacter(ThreadContext context, ByteList result) throws IOException
getbyteback to summary
public IRubyObject getbyte(ThreadContext context)
Annotations
@JRubyMethod
name:getbyte
getbyteback to summary
public IRubyObject getbyte()

Deprecated

Annotations
@Deprecated
getcback to summary
public IRubyObject getc()

Deprecated

Annotations
@Deprecated
getcback to summary
public IRubyObject getc(ThreadContext context)
Annotations
@JRubyMethod
name:getc
getsback to summary
public IRubyObject gets(ThreadContext context, IRubyObject[] args)
Annotations
@JRubyMethod
name:gets
optional:2
checkArity:false
writes:LASTLINE
initializeback to summary
public IRubyObject initialize(ThreadContext context, IRubyObject stream)
initializeback to summary
public IRubyObject initialize(ThreadContext context, IRubyObject[] args)
Annotations
@JRubyMethod
name:initialize
required:1
optional:1
checkArity:false
visibility:PRIVATE
internalGetsback to summary
private IRubyObject internalGets(ThreadContext context, IRubyObject[] args) throws IOException
internalPositionback to summary
private long internalPosition()

Get position within this stream including that has been read by users calling read + what jzlib may have speculatively read in because of buffering.

Returns:long

number of bytes

internalSepGetsback to summary
private IRubyObject internalSepGets(ThreadContext context, ByteList sep) throws IOException
internalSepGetsback to summary
private IRubyObject internalSepGets(ThreadContext context, ByteList sep, int limit) throws IOException
isEofback to summary
private boolean isEof() throws IOException
linenoback to summary
public IRubyObject lineno(ThreadContext context)
Annotations
@JRubyMethod
name:lineno
linenoback to summary
public IRubyObject lineno()

Deprecated

Annotations
@Deprecated
newInstanceback to summary
public static IRubyObject newInstance(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block)
Annotations
@JRubyMethod
name:new
rest:true
meta:true
keywords:true
newInstanceback to summary
public static JZlibRubyGzipReader newInstance(IRubyObject recv, IRubyObject[] args)

Deprecated

since 10.0.

Annotations
@Deprecated
since:10.0
newInstanceback to summary
public static JZlibRubyGzipReader newInstance(ThreadContext context, RubyClass klass, IRubyObject[] args)
newReadByteListback to summary
private ByteList newReadByteList()
newReadByteListback to summary
private ByteList newReadByteList(int size)
openback to summary
public static IRubyObject open(final ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block)
Annotations
@JRubyMethod
name:open
required:1
optional:1
checkArity:false
meta:true
orig_nameback to summary
public IRubyObject orig_name(ThreadContext context)

Overrides org.jruby.ext.zlib.RubyGzipFile.orig_name.

Annotations
@Override
@JRubyMethod
os_codeback to summary
public IRubyObject os_code(ThreadContext context)

Overrides org.jruby.ext.zlib.RubyGzipFile.os_code.

Annotations
@Override
@JRubyMethod
posback to summary
public IRubyObject pos()

Deprecated

since 10.0.

Annotations
@Deprecated
since:10.0
posback to summary
public IRubyObject pos(ThreadContext context)
Annotations
@JRubyMethod
name:pos, tell
readback to summary
public IRubyObject read(ThreadContext context, IRubyObject[] args)
Annotations
@JRubyMethod
name:read
optional:1
checkArity:false
readAllback to summary
private RubyString readAll(ThreadContext context) throws IOException
readAllback to summary
private RubyString readAll(ThreadContext context, int limit) throws IOException
readbyteback to summary
public IRubyObject readbyte()

Deprecated

Annotations
@Deprecated
readbyteback to summary
public IRubyObject readbyte(ThreadContext context)
Annotations
@JRubyMethod
name:readbyte
readcharback to summary
public IRubyObject readchar()

Deprecated

Annotations
@Deprecated
readcharback to summary
public IRubyObject readchar(ThreadContext context)
Annotations
@JRubyMethod
name:readchar
readlineback to summary
public IRubyObject readline(ThreadContext context)
Annotations
@JRubyMethod
name:readline
writes:LASTLINE
readlinesback to summary
public IRubyObject readlines(ThreadContext context, IRubyObject[] args)
Annotations
@JRubyMethod
optional:1
checkArity:false
readpartialback to summary
public IRubyObject readpartial(IRubyObject[] args)

Deprecated

Annotations
@Deprecated
readpartialback to summary
public IRubyObject readpartial(ThreadContext context, IRubyObject[] args)
Annotations
@JRubyMethod
name:readpartial
required:1
optional:1
checkArity:false
readPartialback to summary
private IRubyObject readPartial(ThreadContext context, int len, RubyString outbuf) throws IOException
readSizeback to summary
private ByteList readSize(int length) throws IOException
rewindback to summary
public IRubyObject rewind(ThreadContext context)
Annotations
@JRubyMethod
set_linenoback to summary
public IRubyObject set_lineno(IRubyObject lineArg)

Deprecated

since 10.0.

Annotations
@Deprecated
since:10.0
set_linenoback to summary
public IRubyObject set_lineno(ThreadContext context, IRubyObject lineArg)
Annotations
@JRubyMethod
name:lineno=
skipNewlinesback to summary
private void skipNewlines() throws IOException
ungetbyteback to summary
public IRubyObject ungetbyte(IRubyObject b)

Deprecated

since 10.0.

Annotations
@Deprecated
since:10.0
ungetbyteback to summary
public IRubyObject ungetbyte(ThreadContext context, IRubyObject b)
Annotations
@JRubyMethod
ungetcback to summary
public IRubyObject ungetc(ThreadContext context, IRubyObject cArg)
Annotations
@JRubyMethod
unusedback to summary
public IRubyObject unused()

Deprecated

since 10.0.

Annotations
@Deprecated
since:10.0
unusedback to summary
public IRubyObject unused(ThreadContext context)
Annotations
@JRubyMethod
zcatback to summary
public static IRubyObject zcat(ThreadContext context, IRubyObject klass, IRubyObject[] args, Block block)

Document-method: Zlib::GzipReader.zcat call-seq: Zlib::GzipReader.zcat(io, options = {}, &block) => nil Zlib::GzipReader.zcat(io, options = {}) => string Decompresses all gzip data in the +io+, handling multiple gzip streams until the end of the +io+. There should not be any non-gzip data after the gzip streams. If a block is given, it is yielded strings of uncompressed data, and the method returns +nil+. If a block is not given, the method returns the concatenation of all uncompressed data in all gzip streams.

Annotations
@JRubyMethod
required:1
optional:1
checkArity:false
meta:true
org.jruby.ext.zlib back to summary

public Class JZlibRubyGzipReader.Error

extends Object
Class Inheritance
Annotations
@JRubyClass
name:Zlib::GzipReader::Error
parent:Zlib::GzipReader

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Errorback to summary
public Error()