Class DataURLs.Builder
java.lang.Object
com.github.robtimus.net.protocol.data.DataURLs.Builder
- Direct Known Subclasses:
DataURLs.Builder.FromBytes,DataURLs.Builder.FromText
- Enclosing class:
- DataURLs
A class that can be used to build data URLs.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA class that can be used to build data URLs from bytes.static final classA class that can be used to build data URLs from text.static final classA class that can be used to build data URLs with media types. -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Builder
private Builder()
-
-
Method Details
-
withMediaType
Specifies the media type of the data URL.- Parameters:
mediaType- The media type for the data URL.- Returns:
- This builder object.
- Throws:
NullPointerException- If the media type isnull.IllegalArgumentException- If the media type is invalid.
-
build
Creates a new data URL.- Returns:
- The created data URL.
-
build
-
createURL
-