るりまサーチ

最速Rubyリファレンスマニュアル検索!
88件ヒット [1-88件を表示] (0.078秒)
トップページ > クエリ:-[x] > クエリ:nread[x]

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

ライブラリ

クラス

モジュール

キーワード

検索結果

IO#nread -> Integer (18201.0)

ブロックせずに読み込み可能なバイト数を返します。 ブロックする場合は0を返します。

ブロックせずに読み込み可能なバイト数を返します。
ブロックする場合は0を返します。

判別が不可能な場合は0を返します。

IO.binread(path, length = nil, offset = 0) -> String | nil (6206.0)

path で指定したファイルを open し、offset の所まで seek し、 length バイト読み込みます。

...の mode は "rb:ASCII-8BIT" です。

//emlist[例][ruby]{
IO.write("testfile", "This is line one\nThis is line two\nThis is line three\nAnd so on...\n")
IO.binread("testfile") # => "This is line one\nThis is line two\nThis is line three\nAnd so on...\n"
IO.binread("testfile", 20)...
...# => "This is line one\nThi"
IO.binread("testfile", 20, 10) # => "ne one\nThis is line "
//}

@see IO.read...

Socket::Constants::SO_NREAD -> Integer (6201.0)

@todo Get first packet byte count。

@todo
Get first packet byte count。

Socket::SO_NREAD -> Integer (6201.0)

@todo Get first packet byte count。

@todo
Get first packet byte count。

Pathname#binread(*args) -> String | nil (6200.0)

IO.binread(self.to_s, *args)と同じです。

...O.binread(self.to_s, *args)と同じです。

//emlist[例][ruby]{
require "pathname"

pathname = Pathname("testfile")
pathname.binread # => "This is line one\nThis is line two\nThis is line three\nAnd so on...\n"
pathname.binread(20) # => "This is line one\nThi"
pathname.binread(20...
..., 10) # => "ne one\nThis is line "
//}

@see IO.binread...

絞り込み条件を変える

OpenURI::OpenRead#read(options = {}) -> String (3106.0)

自身が表す内容を読み込んで文字列として返します。 self.open(options={}) {|io| io.read } と同じです。 このメソッドによって返される文字列は OpenURI::Meta によって extend されています。

...のメソッドによって返される文字列は OpenURI::Meta
によって extend されています。

@param options ハッシュを与えます。

require 'open-uri'
uri = URI.parse('http://www.example.com/')
str = uri.read
p str.is_a?(OpenURI::Meta) # => true
p str.content_type...

OpenURI::OpenRead#open(mode = 'r', perm = nil, options = {}) -> StringIO (3100.0)

自身が表すリソースを取得して StringIO オブジェクトとして返します。 OpenURI.open_uri(self, *rest, &block) と同じです。

自身が表すリソースを取得して StringIO オブジェクトとして返します。
OpenURI.open_uri(self, *rest, &block) と同じです。

ブロックを与えた場合は StringIO オブジェクトを引数としてブロックを
評価します。ブロックの終了時に StringIO は close されます。nil を返します。

返り値である StringIO オブジェクトは OpenURI::Meta モジュールで extend されています。

@param mode モードを文字列で与えます。Kernel.#open と同じです。

@param perm 無視されます...

OpenURI::OpenRead#open(mode = 'r', perm = nil, options = {}) {|sio| ... } -> nil (3100.0)

自身が表すリソースを取得して StringIO オブジェクトとして返します。 OpenURI.open_uri(self, *rest, &block) と同じです。

自身が表すリソースを取得して StringIO オブジェクトとして返します。
OpenURI.open_uri(self, *rest, &block) と同じです。

ブロックを与えた場合は StringIO オブジェクトを引数としてブロックを
評価します。ブロックの終了時に StringIO は close されます。nil を返します。

返り値である StringIO オブジェクトは OpenURI::Meta モジュールで extend されています。

@param mode モードを文字列で与えます。Kernel.#open と同じです。

@param perm 無視されます...