MediaContent.java 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /* ----------------------------------------------------------------------------
  2. * This file was automatically generated by SWIG (http://www.swig.org).
  3. * Version 2.0.9
  4. *
  5. * Do not make changes to this file unless you know what you are doing--modify
  6. * the SWIG interface file instead.
  7. * ----------------------------------------------------------------------------- */
  8. package org.doubango.tinyWRAP;
  9. public class MediaContent {
  10. private long swigCPtr;
  11. protected boolean swigCMemOwn;
  12. protected MediaContent(long cPtr, boolean cMemoryOwn) {
  13. swigCMemOwn = cMemoryOwn;
  14. swigCPtr = cPtr;
  15. }
  16. protected static long getCPtr(MediaContent obj) {
  17. return (obj == null) ? 0 : obj.swigCPtr;
  18. }
  19. protected void finalize() {
  20. delete();
  21. }
  22. public synchronized void delete() {
  23. if (swigCPtr != 0) {
  24. if (swigCMemOwn) {
  25. swigCMemOwn = false;
  26. tinyWRAPJNI.delete_MediaContent(swigCPtr);
  27. }
  28. swigCPtr = 0;
  29. }
  30. }
  31. public String getType() {
  32. return tinyWRAPJNI.MediaContent_getType(swigCPtr, this);
  33. }
  34. public long getDataLength() {
  35. return tinyWRAPJNI.MediaContent_getDataLength(swigCPtr, this);
  36. }
  37. public long getData(java.nio.ByteBuffer pOutput, long nMaxsize) {
  38. return tinyWRAPJNI.MediaContent_getData(swigCPtr, this, pOutput, nMaxsize);
  39. }
  40. public static MediaContent parse(java.nio.ByteBuffer pData, long nSize, String pType) {
  41. long cPtr = tinyWRAPJNI.MediaContent_parse__SWIG_0(pData, nSize, pType);
  42. return (cPtr == 0) ? null : new MediaContent(cPtr, true);
  43. }
  44. public static MediaContentCPIM parse(java.nio.ByteBuffer pData, long nSize) {
  45. long cPtr = tinyWRAPJNI.MediaContent_parse__SWIG_1(pData, nSize);
  46. return (cPtr == 0) ? null : new MediaContentCPIM(cPtr, true);
  47. }
  48. public long getPayloadLength() {
  49. return tinyWRAPJNI.MediaContent_getPayloadLength(swigCPtr, this);
  50. }
  51. public long getPayload(java.nio.ByteBuffer pOutput, long nMaxsize) {
  52. return tinyWRAPJNI.MediaContent_getPayload(swigCPtr, this, pOutput, nMaxsize);
  53. }
  54. }