public class InlineStringReference extends AbstractExternalReference implements ValueCarryingExternalReference<String>
Constructor and Description |
---|
InlineStringReference() |
Modifier and Type | Method and Description |
---|---|
InlineStringReference |
clone() |
Long |
getApproximateSizeInBytes()
Approximate size of the stored data or -1 if we do not know.
|
String |
getCharset()
Character encoding set to 'UTF-8' by default
|
String |
getContents()
Get the 'value' of this reference as a string, really just returns the
internal string representation.
|
ReferencedDataNature |
getDataNature()
Data nature set to 'ReferencedDataNature.TEXT'
|
float |
getResolutionCost()
Default resolution cost of 0.0f whatever the contents
|
String |
getValue()
Returns the value
|
Class<String> |
getValueType()
Returns the type of the inlined value
|
InputStream |
openStream(ReferenceContext arg0)
Fakes a de-reference operation, returning a byte stream over the string
data.
|
void |
setContents(String contents)
Set the 'value' of this reference as a string.
|
String |
toString()
String representation for testing, returns
string{CONTENTS} |
getPrimaryKey, setPrimaryKey
public void setContents(String contents)
public String getContents()
public InputStream openStream(ReferenceContext arg0)
openStream
in interface ExternalReferenceSPI
arg0
- the ReferenceContext object used to obtain e.g. security
agents or other facilities required when de-referencing this
reference.public float getResolutionCost()
getResolutionCost
in interface ExternalReferenceSPI
getResolutionCost
in class AbstractExternalReference
public ReferencedDataNature getDataNature()
getDataNature
in interface ExternalReferenceSPI
getDataNature
in class AbstractExternalReference
public String getCharset()
getCharset
in interface ExternalReferenceSPI
getCharset
in class AbstractExternalReference
null
if binary or unknown type.public String toString()
string{CONTENTS}
public String getValue()
ValueCarryingExternalReference
getValue
in interface ValueCarryingExternalReference<String>
public Class<String> getValueType()
ValueCarryingExternalReference
getValueType
in interface ValueCarryingExternalReference<String>
public Long getApproximateSizeInBytes()
ExternalReferenceSPI
getApproximateSizeInBytes
in interface ExternalReferenceSPI
public InlineStringReference clone()
clone
in interface ExternalReferenceSPI
clone
in class AbstractExternalReference
Copyright © 2015–2016 The Apache Software Foundation. All rights reserved.