public static final class Content.WebCacheContent
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static Content.WebCacheContent |
fromBytes(ArtifactCacheManager.Context cntxt,
byte[] bytes)
Creates a content value from an in memory byte stream.
|
static Content.WebCacheContent |
fromBytes(ArtifactCacheManager.Context cntxt,
byte[] bytes,
Content.Type type)
Creates a content value from an in memory byte stream.
|
Content.Type |
getContentType()
Gets the content type.
|
int |
getID()
if this Content instance represents an attachment, returns the
associated attachment ID
|
MD5 |
getMD5() |
java.lang.String |
getName()
returns the advisory name (or description) of this content the name
is typically associated with a rendering mechanism on the client,
e.g.
|
long |
getSize() |
void |
setContentType(Content.Type type)
Sets the Content Type for this content.
|
void |
setName(java.lang.String name)
set an advisory name (or description) to be saved along with the
content the name may typically be associated with a file name on the
local platform and a rendering mechanism; e.g.
|
byte[] |
toBytes()
Given Content from the cache, return a byte[] containing the content
data specific to the provided Content object
|
public static Content.WebCacheContent fromBytes(ArtifactCacheManager.Context cntxt, byte[] bytes)
cntxt
- The context of the operationbytes
- The byte array representing the content data.public static Content.WebCacheContent fromBytes(ArtifactCacheManager.Context cntxt, byte[] bytes, Content.Type type)
cntxt
- The context of the operationbytes
- The byte array representing the content data.type
- the content typepublic byte[] toBytes()
public long getSize()
Content.toFile(java.io.File)
,
Content.WebCacheContent.getMD5()
public int getID()
public java.lang.String getName()
public void setName(java.lang.String name)
name
- an advisory name to be stored along with the contentpublic MD5 getMD5()
Content.WebCacheContent.getMD5()
public void setContentType(Content.Type type)
type
- the Content Type.public Content.Type getContentType()
StarTeam SDK 17.0, Build 34
Copyright © 2019 Micro Focus or one of its affiliates. All rights reserved.