Package org.robolectric.res.android
Class Asset
- java.lang.Object
-
- org.robolectric.res.android.Asset
-
public abstract class Asset extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Asset.AccessMode
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
close()
static String
getAssetAllocations()
abstract byte[]
getBuffer(boolean wordAligned)
abstract File
getFile()
abstract String
getFileName()
static int
getGlobalCount()
abstract long
getLength()
abstract long
getRemainingLength()
abstract boolean
isNinePatch()
static Asset
newFileAsset(FileTypedResource fileTypedResource)
abstract FileDescriptor
openFileDescriptor(Ref<Long> outStart, Ref<Long> outLength)
int
read(byte[] buf, int count)
abstract int
read(byte[] buf, int bufOffset, int count)
abstract long
seek(long offset, int whence)
-
-
-
Field Detail
-
EXCLUDED_ASSET
public static final Asset EXCLUDED_ASSET
-
onClose
public Runnable onClose
-
SEEK_SET
public static final int SEEK_SET
- See Also:
- Constant Field Values
-
SEEK_CUR
public static final int SEEK_CUR
- See Also:
- Constant Field Values
-
SEEK_END
public static final int SEEK_END
- See Also:
- Constant Field Values
-
-
Method Detail
-
newFileAsset
public static Asset newFileAsset(FileTypedResource fileTypedResource) throws IOException
- Throws:
IOException
-
read
public final int read(byte[] buf, int count)
-
read
public abstract int read(byte[] buf, int bufOffset, int count)
-
seek
public abstract long seek(long offset, int whence)
-
close
public abstract void close()
-
getBuffer
public abstract byte[] getBuffer(boolean wordAligned)
-
getLength
public abstract long getLength()
-
getRemainingLength
public abstract long getRemainingLength()
-
openFileDescriptor
public abstract FileDescriptor openFileDescriptor(Ref<Long> outStart, Ref<Long> outLength)
-
getFile
public abstract File getFile()
-
getFileName
public abstract String getFileName()
-
isNinePatch
public abstract boolean isNinePatch()
-
getGlobalCount
public static int getGlobalCount()
-
getAssetAllocations
public static String getAssetAllocations()
-
-