Class: MultiGit::JGitBackend::RewindeableIO Private

Inherits:
IO
  • Object
show all
Defined in:
lib/multi_git/jgit_backend/rewindeable_io.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Note:

This is a Hack

Note:

Remember to mark the stream before you build this.

A IO subclass that implements rewind for java streams with mark set.

Defined Under Namespace

Classes: JavaRewindeableIO

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new(inputStream) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



34
35
36
37
38
39
# File 'lib/multi_git/jgit_backend/rewindeable_io.rb', line 34

def self.new(inputStream)
  jruby_io = JavaRewindeableIO.new(inputStream)
  io = JRuby.dereference(jruby_io)
  io.instance_variable_set(:@backend, inputStream)
  return io
end

Instance Method Details

#rewindObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



41
42
43
# File 'lib/multi_git/jgit_backend/rewindeable_io.rb', line 41

def rewind
  @backend.reset
end