|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.system.MemoryBlobStream
public class MemoryBlobStream
Memory blob stream object.
When implementing your own objects, you will sometimes need to provide support for persistence. For example, with a custom feature renderer, persistence enables its settings to be written to an MXD file so that when ArcMap is restarted, the layer having custom rendering will be drawn in the same way as previously drawn. The COM concept of streams provides a way of reading and writing data to the persisted storage.
A memory blob stream provides storage for binary data in memory.
MemoryBlobStreams are particularly useful for writing arbitrary data to databases. When writing objects to the database, you should cocreate an ObjectStream and use that in conjunction with your MemoryBlobStream.
Constructor Summary | |
---|---|
MemoryBlobStream()
Constructs a MemoryBlobStream using ArcGIS Engine. |
|
MemoryBlobStream(Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. MemoryBlobStream theMemoryBlobStream = (MemoryBlobStream) obj; |
Method Summary | |
---|---|
void |
attachToMemory(byte[] blobMemory,
int size,
int transferOwnership)
Attaches the stream to memory. |
void |
commit(int grfCommitFlags)
commit |
boolean |
equals(Object o)
Compare this object with another |
void |
esri_clone(IStream[] ppstm)
esri_clone |
void |
exportToVariant(Object[] value)
Copies the memory to a variant that contains an array of bytes. |
int |
getAllocSize()
The allocated size of the stream. |
static String |
getClsid()
getClsid. |
int |
getDocumentVersion()
The version of the document to save. |
void |
getMemory(byte[] blobMemory,
int[] size)
The memory of the blob stream. |
int |
getPaddingSize()
The allocated size of the stream. |
int |
getSize()
The size of the stream. |
int |
hashCode()
the hashcode for this object |
void |
importFromMemory(byte[] blobMemory,
int size)
Import using another blob. |
void |
importFromVariant(Object value)
Imports from the array of bytes in the variant. |
void |
interfaceSupportsErrorInfo(GUID riid)
interfaceSupportsErrorInfo |
void |
loadFromFile(String fileName)
Loads a stream from the specified file. |
void |
lockRegion(_ULARGE_INTEGER libOffset,
_ULARGE_INTEGER cb,
int dwLockType)
lockRegion |
void |
remoteCopyTo(IStream pstm,
_ULARGE_INTEGER cb,
_ULARGE_INTEGER[] pcbRead,
_ULARGE_INTEGER[] pcbWritten)
remoteCopyTo |
void |
remoteRead(byte[] pv,
int cb,
int[] pcbRead)
remoteRead |
void |
remoteSeek(_LARGE_INTEGER dlibMove,
int dwOrigin,
_ULARGE_INTEGER[] plibNewPosition)
remoteSeek |
void |
remoteWrite(byte[] pv,
int cb,
int[] pcbWritten)
remoteWrite |
void |
revert()
revert |
void |
saveToFile(String fileName)
Saves the stream to the specified file. |
void |
setAllocSize(int size)
The allocated size of the stream. |
void |
setDocumentVersion(int docVersion)
The version of the document to save. |
void |
setPaddingSize(int size)
The allocated size of the stream. |
void |
setSize(_ULARGE_INTEGER libNewSize)
setSize |
void |
setSize(int size)
The size of the stream. |
void |
stat(tagSTATSTG[] pstatstg,
int grfStatFlag)
stat |
void |
unlockRegion(_ULARGE_INTEGER libOffset,
_ULARGE_INTEGER cb,
int dwLockType)
unlockRegion |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef |
---|
getJintegraDispatch, release |
Constructor Detail |
---|
public MemoryBlobStream() throws IOException, UnknownHostException
IOException
- if there are interop problems
UnknownHostException
- if there are interop problemspublic MemoryBlobStream(Object obj) throws IOException
MemoryBlobStream theMemoryBlobStream = (MemoryBlobStream) obj;
obj
to MemoryBlobStream
.
obj
- an object returned from ArcGIS Engine or Server
IOException
- if there are interop problemsMethod Detail |
---|
public static String getClsid()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public void attachToMemory(byte[] blobMemory, int size, int transferOwnership) throws IOException, AutomationException
attachToMemory
in interface IMemoryBlobStream
blobMemory
- An unsigned byte (in)size
- The size (in)transferOwnership
- The transferOwnership (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void importFromMemory(byte[] blobMemory, int size) throws IOException, AutomationException
importFromMemory
in interface IMemoryBlobStream
blobMemory
- An unsigned byte (in)size
- The size (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void getMemory(byte[] blobMemory, int[] size) throws IOException, AutomationException
getMemory
in interface IMemoryBlobStream
blobMemory
- An unsigned byte (out: use single element array)size
- The size (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getSize() throws IOException, AutomationException
getSize
in interface IBlobStream
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setSize(int size) throws IOException, AutomationException
setSize
in interface IBlobStream
size
- The size (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void saveToFile(String fileName) throws IOException, AutomationException
saveToFile
in interface IBlobStream
fileName
- The fileName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void loadFromFile(String fileName) throws IOException, AutomationException
loadFromFile
in interface IBlobStream
fileName
- The fileName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void remoteSeek(_LARGE_INTEGER dlibMove, int dwOrigin, _ULARGE_INTEGER[] plibNewPosition) throws IOException, AutomationException
IStream is a Microsoft interface. Please refer to MSDN for information about this interface.
remoteSeek
in interface IStream
dlibMove
- A Structure: com.esri.arcgis.system._LARGE_INTEGER (in)dwOrigin
- The dwOrigin (in)plibNewPosition
- A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setSize(_ULARGE_INTEGER libNewSize) throws IOException, AutomationException
IStream is a Microsoft interface. Please refer to MSDN for information about this interface.
setSize
in interface IStream
libNewSize
- A Structure: com.esri.arcgis.system._ULARGE_INTEGER (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void remoteCopyTo(IStream pstm, _ULARGE_INTEGER cb, _ULARGE_INTEGER[] pcbRead, _ULARGE_INTEGER[] pcbWritten) throws IOException, AutomationException
IStream is a Microsoft interface. Please refer to MSDN for information about this interface.
remoteCopyTo
in interface IStream
pstm
- A reference to a com.esri.arcgis.system.IStream (in)cb
- A Structure: com.esri.arcgis.system._ULARGE_INTEGER (in)pcbRead
- A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)pcbWritten
- A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void commit(int grfCommitFlags) throws IOException, AutomationException
IStream is a Microsoft interface. Please refer to MSDN for information about this interface.
commit
in interface IStream
grfCommitFlags
- The grfCommitFlags (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void revert() throws IOException, AutomationException
IStream is a Microsoft interface. Please refer to MSDN for information about this interface.
revert
in interface IStream
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void lockRegion(_ULARGE_INTEGER libOffset, _ULARGE_INTEGER cb, int dwLockType) throws IOException, AutomationException
IStream is a Microsoft interface. Please refer to MSDN for information about this interface.
lockRegion
in interface IStream
libOffset
- A Structure: com.esri.arcgis.system._ULARGE_INTEGER (in)cb
- A Structure: com.esri.arcgis.system._ULARGE_INTEGER (in)dwLockType
- The dwLockType (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void unlockRegion(_ULARGE_INTEGER libOffset, _ULARGE_INTEGER cb, int dwLockType) throws IOException, AutomationException
IStream is a Microsoft interface. Please refer to MSDN for information about this interface.
unlockRegion
in interface IStream
libOffset
- A Structure: com.esri.arcgis.system._ULARGE_INTEGER (in)cb
- A Structure: com.esri.arcgis.system._ULARGE_INTEGER (in)dwLockType
- The dwLockType (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void stat(tagSTATSTG[] pstatstg, int grfStatFlag) throws IOException, AutomationException
IStream is a Microsoft interface. Please refer to MSDN for information about this interface.
stat
in interface IStream
pstatstg
- A Structure: com.esri.arcgis.system.tagSTATSTG (out: use single element array)grfStatFlag
- The grfStatFlag (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void esri_clone(IStream[] ppstm) throws IOException, AutomationException
esri_clone
in interface IStream
ppstm
- A reference to a com.esri.arcgis.system.IStream (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void remoteRead(byte[] pv, int cb, int[] pcbRead) throws IOException, AutomationException
ISequentialStream is a Microsoft interface. Please refer to MSDN for information about this interface.
remoteRead
in interface ISequentialStream
pv
- An unsigned byte (out: use single element array)cb
- The cb (in)pcbRead
- The pcbRead (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void remoteWrite(byte[] pv, int cb, int[] pcbWritten) throws IOException, AutomationException
ISequentialStream is a Microsoft interface. Please refer to MSDN for information about this interface.
remoteWrite
in interface ISequentialStream
pv
- An unsigned byte (in)cb
- The cb (in)pcbWritten
- The pcbWritten (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getAllocSize() throws IOException, AutomationException
getAllocSize
in interface IMemoryBlobStream2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setAllocSize(int size) throws IOException, AutomationException
setAllocSize
in interface IMemoryBlobStream2
size
- The size (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getPaddingSize() throws IOException, AutomationException
getPaddingSize
in interface IMemoryBlobStream2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setPaddingSize(int size) throws IOException, AutomationException
setPaddingSize
in interface IMemoryBlobStream2
size
- The size (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void exportToVariant(Object[] value) throws IOException, AutomationException
exportToVariant
in interface IMemoryBlobStreamVariant
value
- A Variant (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void importFromVariant(Object value) throws IOException, AutomationException
importFromVariant
in interface IMemoryBlobStreamVariant
value
- A Variant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setDocumentVersion(int docVersion) throws IOException, AutomationException
setDocumentVersion
in interface IDocumentVersion
docVersion
- A com.esri.arcgis.system.esriArcGISVersion constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getDocumentVersion() throws IOException, AutomationException
Determines which version an object is persisted. This can be useful when saving an object ObjectStream or MemoryBlobStream and you want the version of that object to be compatible with previous releases of ArcGIS. Not all persistable objects implement IDocumentVersion; you should ensure the object supports this interface before accessing this property.
getDocumentVersion
in interface IDocumentVersion
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void interfaceSupportsErrorInfo(GUID riid) throws IOException, AutomationException
Indicates whether the interface supports IErrorInfo.
interfaceSupportsErrorInfo
in interface ISupportErrorInfo
riid
- A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |