protected static class Blob.InMemoryBackend extends Blob.Backend
Blob.Backend
that stores the bytes in memory.Modifier | Constructor and Description |
---|---|
protected |
InMemoryBackend(byte[] bytes,
String fileName,
String type,
long lastModified)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
protected static Blob.InMemoryBackend |
create(org.htmlunit.corejs.javascript.NativeArray fileBits,
String fileName,
String type,
long lastModified)
Factory method to create an
Blob.InMemoryBackend from an NativeArray . |
byte[] |
getBytes(int start,
int end) |
KeyDataPair |
getKeyDataPair(String name,
String fileName,
String contentType)
Returns the KeyDataPare for this Blob/File.
|
long |
getLastModified() |
String |
getName() |
long |
getSize() |
String |
getText() |
String |
getType(BrowserVersion browserVersion) |
protected static Blob.InMemoryBackend create(org.htmlunit.corejs.javascript.NativeArray fileBits, String fileName, String type, long lastModified)
Blob.InMemoryBackend
from an NativeArray
.fileBits
- the bytes as NativeArray
fileName
- the nametype
- the typelastModified
- last modifiedBlob.InMemoryBackend
public String getName()
public long getLastModified()
public long getSize()
public String getType(BrowserVersion browserVersion)
browserVersion
- the BrowserVersion
public String getText() throws IOException
IOException
- in case of errorpublic byte[] getBytes(int start, int end)
start
- the start positionend
- the end positionpublic KeyDataPair getKeyDataPair(String name, String fileName, String contentType)
name
- the namefileName
- the file namecontentType
- the content typeCopyright © 2002–2024 Gargoyle Software Inc.. All rights reserved.