Movatterモバイル変換


[0]ホーム

URL:


menu
  1. Dart
  2. dart:core
  3. UriData class
UriData
description

UriData classfinal

A way to access the structure of adata: URI.

Data URIs are non-hierarchical URIs that can contain any binary data.They are defined byRFC 2397.

This class allows parsing the URI text, extracting individual parts of theURI, as well as building the URI text from structured parts.

Constructors

UriData.fromBytes(List<int>bytes, {StringmimeType ="application/octet-stream",Map<String,String>?parameters,boolpercentEncoded =false})
Creates adata: URI containing an encoding ofbytes.
factory
UriData.fromString(Stringcontent, {String?mimeType,Encoding?encoding,Map<String,String>?parameters,boolbase64 =false})
Creates adata: URI containing thecontent string.
factory
UriData.fromUri(Uriuri)
Creates aDataUri from aUri which must havedata asUri.scheme.
factory

Properties

charsetString
The charset parameter of the media type.
no setter
contentTextString
The content part of the data URI, as its actual representation.
no setter
hashCodeint
The hash code for this object.
no setterinherited
isBase64bool
Whether the data is Base64 encoded or not.
no setter
mimeTypeString
The MIME type of the data URI.
no setter
parametersMap<String,String>
A map representing the parameters of the media type.
no setter
runtimeTypeType
A representation of the runtime type of the object.
no setterinherited
uriUri
TheUri that thisUriData is giving access to.
no setter

Methods

contentAsBytes()Uint8List
The content part of the data URI as bytes.
contentAsString({Encoding?encoding})String
Creates a string from the content of the data URI.
isCharset(Stringcharset)bool
Checks whether the charset parameter of the mime type ischarset.
isEncoding(Encodingencoding)bool
Whether the charset parameter representsencoding.
isMimeType(StringmimeType)bool
Whether theUriData.mimeType is equal tomimeType.
noSuchMethod(Invocationinvocation)→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString()String
A string representation of this object.
override

Operators

operator ==(Objectother)bool
The equality operator.
inherited

Static Methods

parse(Stringuri)UriData
Parses a string as adata URI.
  1. Dart
  2. dart:core
  3. UriData class
dart:core library

[8]ページ先頭

©2009-2025 Movatter.jp