=encoding euc-jp =head1 NAME =begin original URI::data - URI that contains immediate data =end original URI::data - 直にデータを持っている URI =head1 SYNOPSIS use URI; $u = URI->new("data:"); $u->media_type("image/gif"); $u->data(scalar(`cat camel.gif`)); print "$u\n"; open(XV, "|xv -") and print XV $u->data; =head1 DESCRIPTION =begin original The C class supports C objects belonging to the I URI scheme. The I URI scheme is specified in RFC 2397. It allows inclusion of small data items as "immediate" data, as if it had been included externally. Examples: =end original C クラスは I URI スキームに所属する C オブジェクトを サポートします。 I URI スキームは RFC 2397 で定義されます。 それは小さなデータ要素を "immediate" データとして、まるで外部に 含まれているかのように、含まれるようにします。 例: data:,Perl%20is%20good data:image/gif;base64,R0lGODdhIAAgAIAAAAAAAPj8+CwAAAAAI AAgAAAClYyPqcu9AJyCjtIKc5w5xP14xgeO2tlY3nWcajmZZdeJcG Kxrmimms1KMTa1Wg8UROx4MNUq1HrycMjHT9b6xKxaFLM6VRKzI+p KS9XtXpcbdun6uWVxJXA8pNPkdkkxhxc21LZHFOgD2KMoQXa2KMWI JtnE2KizVUkYJVZZ1nczBxXlFopZBtoJ2diXGdNUymmJdFMAADs= =begin original C objects belonging to the data scheme support the common methods (described in L) and the following two scheme-specific methods: =end original dataスキームに所属するURI オブジェクトは(URIで説明される)共通メソッドをサポートし、以下の2つのスキーム特有のメソッドをサポートします: =over 4 =item $uri->media_type( [$new_media_type] ) =begin original Can be used to get or set the media type specified in the URI. If no media type is specified, then the default C<"text/plain;charset=US-ASCII"> is returned. =end original URI で指定されるメディアタイプの取得または設定に使うことが出来ます。 なにもメディアタイプが指定されなければ、デフォルトの C<"text/plain;charset=US-ASCII"> が返されます。 =item $uri->data( [$new_data] ) =begin original Can be used to get or set the data contained in the URI. The data is passed unescaped (in binary form). The decision about whether to base64 encode the data in the URI is taken automatically, based on the encoding that produces the shorter URI string. =end original このメソッドは URI に含まれるデータの取得または設定に使うことができます。 データはエスケープされることなく (バイナリ形式で) 渡されます。 URI のなかのデータを base64 エンコードするかどうかは、どのエンコードが 最も短い URI 文字列を生成するかをベースに自動的に決められます。 =back =head1 SEE ALSO L =head1 COPYRIGHT Copyright 1995-1998 Gisle Aas. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =begin meta Translate: Hippo2000 (1.04) Update: Kentaro SHIRAKATA (1.35) Status: completed =end meta =cut