Class Buffer
- 네임스페이스
- easyar
- 어셈블리
- EasyAR.Sense.dll
Buffer는 원시 바이트 배열을 저장하며, 이미지 데이터에 접근하는 데 사용할 수 있습니다. Java API에서는 `Image`_ 에서 buffer를 가져온 후 데이터를 Java 바이트 배열로 copy할 수 있습니다. EasyAR Sense의 모든 버전에서 이미지 데이터에 접근할 수 있습니다. `Image`_ 를 참조하십시오.
public class Buffer : RefBase, IDisposable
- 상속
-
Buffer
- 구현
- 상속된 멤버
메서드
Clone()
public Buffer Clone()
copyFromByteArray(byte[])
public void copyFromByteArray(byte[] src)
매개 변수
src
copyFromByteArray(byte[], int, int, int)
public void copyFromByteArray(byte[] src, int srcIndex, int index, int length)
매개 변수
srcsrcIndexindexlength
copyToByteArray(byte[])
public void copyToByteArray(byte[] dest)
매개 변수
dest
copyToByteArray(int, byte[], int, int)
public void copyToByteArray(int index, byte[] dest, int destIndex, int length)
매개 변수
indexdestdestIndexlength
create(int)
지정된 바이트 길이의 Buffer를 생성합니다.
public static Buffer create(int size)
매개 변수
size
data()
원시 메모리 주소를 반환합니다.
public virtual IntPtr data()
memoryCopy(IntPtr, IntPtr, int)
원시 메모리를 복사합니다. 주로 메모리 조작이 미흡한 언어나 환경에서 사용됩니다.
public static void memoryCopy(IntPtr src, IntPtr dest, int length)
매개 변수
srcdestlength
partition(int, int)
하위 버퍼를 생성하고 원본 버퍼를 참조합니다. 버퍼는 모든 하위 버퍼가 해제된 후에야 해제됩니다.
public virtual Buffer partition(int index, int length)
매개 변수
indexlength
size()
Buffer의 바이트 길이.
public virtual int size()
tryCopyFrom(IntPtr, int, int, int)
원시 메모리 주소에서 Buffer로 데이터를 복사하려고 시도합니다. 복사가 성공하면 true를 반환하고, 그렇지 않으면 false를 반환합니다. 실패하는 이유는 다음과 같습니다: 원본 데이터 범위 또는 대상 데이터 범위가 사용 가능한 범위를 벗어남.
public virtual bool tryCopyFrom(IntPtr src, int srcIndex, int index, int length)
매개 변수
srcsrcIndexindexlength
tryCopyTo(int, IntPtr, int, int)
버퍼에서 원시 메모리 주소로 데이터를 복사하려 시도합니다. 복사가 성공하면 true를 반환하고, 실패하면 false를 반환합니다. 실패 원인은 다음과 같습니다: 소스 데이터 범위 또는 대상 데이터 범위가 사용 가능한 범위를 벗어난 경우입니다.
public virtual bool tryCopyTo(int index, IntPtr dest, int destIndex, int length)
매개 변수
indexdestdestIndexlength
wrap(IntPtr, int, Action)
지정된 길이의 원시 메모리 블록을 래핑합니다. Buffer가 완전히 해제될 때, 사용자 정의 메모리 해제 동작을 수행하는 deleter 콜백이 호출됩니다. deleter는 반드시 스레드-안전해야 합니다.
public static Buffer wrap(IntPtr ptr, int size, Action deleter)
매개 변수
ptrsizedeleter
wrapByteArray(byte[])
public static Buffer wrapByteArray(byte[] bytes)
매개 변수
bytes
wrapByteArray(byte[], int, int)
public static Buffer wrapByteArray(byte[] bytes, int index, int length)
매개 변수
bytesindexlength
wrapByteArray(byte[], int, int, Action)
public static Buffer wrapByteArray(byte[] bytes, int index, int length, Action deleter)
매개 변수
bytesindexlengthdeleter