public class Data
extends java.lang.Object
Constructor and Description |
---|
Data(java.nio.file.Path path)
Initialize use path.
|
Data(java.lang.String text)
Initialize use text.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getContent()
Returns content.
|
DataType |
getDataType()
Returns data type.
|
java.lang.String |
getTitle()
Returns title.
|
static Data |
parse(DataType type,
byte[] source)
Create data.
|
byte[] |
toBytes()
Returns title appends content as bytes.
|
java.lang.String |
toString() |
public Data(java.lang.String text)
text
- textpublic Data(java.nio.file.Path path)
path
- pathpublic static Data parse(DataType type, byte[] source)
type
- typesource
- sourcepublic DataType getDataType()
public java.lang.String getTitle()
public byte[] getContent()
public byte[] toBytes()
public java.lang.String toString()
toString
in class java.lang.Object