Class: JavaClass::ArrayIO

Inherits:
Object
  • Object
show all
Defined in:
lib/javaclass/reader.rb

Overview

byte配列をIOに見せかける。

Instance Method Summary collapse

Constructor Details

#initialize(array) ⇒ ArrayIO

Returns a new instance of ArrayIO.



10
11
12
# File 'lib/javaclass/reader.rb', line 10

def initialize( array )
  @array = array
end

Instance Method Details

#getcObject



13
14
15
# File 'lib/javaclass/reader.rb', line 13

def getc
  @array.shift
end

#read(length) ⇒ Object



16
17
18
# File 'lib/javaclass/reader.rb', line 16

def read(length)
  @array.slice!(0, length).pack("C*")
end