クラス
-
ARGF
. class (33) - CGI (11)
- CSV (66)
- IO (77)
-
Net
:: Telnet (12) - StringIO (11)
キーワード
-
$ stdin (11) - IO (11)
-
NEEDS
_ BINMODE (11) - binmode= (2)
- binmode? (33)
- binwrite (11)
- capture2 (11)
- capture2e (11)
- capture3 (11)
-
for
_ fd (11) -
internal
_ encoding (11) - new (15)
- open (66)
- preprocess (2)
- print (2)
-
rb
_ io _ mode _ flags (1) -
rb
_ io _ mode _ flags2 (11) -
ruby 1
. 8 . 2 feature (11)
検索結果
先頭5件
-
Net
:: Telnet # binmode(mode=nil) -> bool (18133.0) -
引数を指定しない場合には"Binmode"の値を返します。 引数を与えた場合は"Binmode"の値を変更します。
...引数を指定しない場合には"Binmode"の値を返します。
引数を与えた場合は"Binmode"の値を変更します。
これは改行文字の変換をするかどうかを意味します。
@param mode 設定する値をtrue/falseで与えます
@see Net::Telnet.new... -
IO
# binmode -> self (18131.0) -
ストリームをバイナリモードにします。MSDOS などバイナリモードの存在 する OS でのみ有効です。そうでない場合このメソッドは何もしません。
...ンしかありません。
@raise Errno::EXXX モードの変更に失敗した場合に発生します。
//emlist[例][ruby]{
IO.open(IO.sysopen("testfile", "w+")) do |io|
io.binmode? # => false
io.binmode # => #<IO:fd 8>
io.binmode? # => true
end
//}
@see c:IO#io_binmode, IO#binmode?... -
CSV
# binmode -> self (18123.0) -
IO#binmode に委譲します。
...IO#binmode に委譲します。
@see IO#binmode... -
ARGF
. class # binmode -> self (18119.0) -
self をバイナリモードにします。一度バイナリモードになった後は非バイナリ モードに戻る事はできません。
...test1.png + test2.png = 292B
# $ ruby test.rb test1.png test2.png
ARGF.binmode
ARGF.read.size # => 292
例:
# test1.png - 164B
# test2.png - 128B
# test1.png + test2.png = 292B
# $ ruby test.rb test1.png test2.png
ARGF.read.size # => 290
@see IO#binmode, ARGF.class#binmode?... -
StringIO
# binmode -> self (18101.0) -
何もせずに self を返します。
何もせずに self を返します。 -
ARGF
. class # binmode? -> bool (6137.0) -
ARGF の入力ストリームがバイナリモードなら true を返します。 そうでない場合、false を返します。
...ムがバイナリモードなら true を返します。
そうでない場合、false を返します。
バイナリモードにするためには ARGF.class#binmode を使用します。
ARGF.binmode? # => false
ARGF.binmode
ARGF.binmode? # => true
@see IO#binmode?, ARGF.class#binmode... -
CSV
# binmode? -> bool (6123.0) -
IO#binmode? に委譲します。
...IO#binmode? に委譲します。
@see IO#binmode?... -
Net
:: Telnet # binmode=(mode) (6123.0) -
"Binmode" を設定します。これは改行文字の変換をするかどうかを意味します。
..."Binmode" を設定します。これは改行文字の変換をするかどうかを意味します。
@param mode 設定する値をtrue/falseで与えます
@see Net::Telnet.new, Net::Telnet#binmode... -
IO
# binmode? -> bool (6113.0) -
自身がバイナリモードなら true を返します。そうでない場合、false を返します。
...自身がバイナリモードなら true を返します。そうでない場合、false を返します。
@see c:IO#io_binmode, IO#binmode... -
CGI
:: NEEDS _ BINMODE -> bool (6101.0) -
ファイルを開くときにバイナリモードが必要かどうかを表す定数です。 プラットフォーム依存の定数です。
ファイルを開くときにバイナリモードが必要かどうかを表す定数です。
プラットフォーム依存の定数です。 -
IO
. binwrite(path , string , offset=nil) -> Integer (18.0) -
path で指定されるファイルを開き、string を書き込み、 閉じます。
...0a 00 00 00 0d 49 48 44 52
# binwriteを使用した場合: どの環境でも正しく保存できる。
IO.binwrite('white.binmode.png', png)
puts IO.binread('white.binmode.png', 16).unpack('C*').map {|c| '%02x' % c }.join(' ')
# => 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52
# binwriteを.......write('white.txtmode.png', png)
puts IO.binread('white.txtmode.png', 16).unpack('C*').map {|c| '%02x' % c }.join(' ')
# => 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 (Linux/Macの場合
# => 89 50 4e 47 0d 0d 0a 1a 0d 0a 00 00 00 0d 49 48 (Windowsの場合
//}
@see c:IO#io_binmode, IO.write...