Sha256: 2403606449c43f5775c67c12f044e95a84a8969f7e8cdbd1fd3a1b1b137b2ce3
Contents?: true
Size: 620 Bytes
Versions: 29
Compression:
Stored size: 620 Bytes
Contents
# This code is free software; you can redistribute it and/or modify it under # the terms of the new BSD License. # # Copyright (c) 2013-2017, Sebastian Staudt class RBzip2::Java::Compressor def initialize(io) @io = RBzip2::Java::BZip2CompressorOutputStream.new io.to_outputstream end def flush @io.flush end def close @io.close end def putc(int) if int.is_a? Numeric write int & 0xff else write int.to_s[0] end end def puts(line) write line + $/ end def write(bytes) raise 'stream closed' if @io.nil? @io.write bytes.to_java_bytes end end
Version data entries
29 entries across 29 versions & 2 rubygems