org.ccsds.moims.mo.mal.structures.Blob.getValue()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(5.9k)|赞(0)|评价(0)|浏览(149)

本文整理了Java中org.ccsds.moims.mo.mal.structures.Blob.getValue()方法的一些代码示例,展示了Blob.getValue()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Blob.getValue()方法的具体详情如下:
包路径:org.ccsds.moims.mo.mal.structures.Blob
类名称:Blob
方法名:getValue

Blob.getValue介绍

暂无

代码示例

代码示例来源:origin: int.esa.nmf.core.moservices.impl/ccsds-com

@Override
public void retrieveRangeAgainUpdateReceived(org.ccsds.moims.mo.mal.transport.MALMessageHeader msgHeader,
    org.ccsds.moims.mo.mal.structures.Blob chunk, org.ccsds.moims.mo.mal.structures.UInteger indexReceived, java.util.Map qosProperties) {
  int index = (int) indexReceived.getValue();
  Logger.getLogger(ArchiveSyncGenAdapter.class.getName()).log(Level.INFO,
      "Received on rerequest! Chunk index: " + index);
  lastTimeReceived = System.currentTimeMillis();
  try {
    receivedChunks.add(index, chunk.getValue());
  } catch (MALException ex) {
    Logger.getLogger(ArchiveSyncGenAdapter.class.getName()).log(Level.SEVERE, null, ex);
  }
}

代码示例来源:origin: int.esa.nmf.core.moservices.impl/ccsds-com

@Override
public synchronized void retrieveRangeUpdateReceived(org.ccsds.moims.mo.mal.transport.MALMessageHeader msgHeader,
    Blob chunk, UInteger indexReceived, java.util.Map qosProperties) {
  int index = (int) indexReceived.getValue();
  /*
  Logger.getLogger(ArchiveSyncAdapter.class.getName()).log(Level.INFO,
      "Received! Chunk index: " + index);
   */
  lastTimeReceived = System.currentTimeMillis();
  lastknowIndex = index;
  try {
    receivedChunks.add(index, chunk.getValue());
  } catch (MALException ex) {
    Logger.getLogger(ArchiveSyncGenAdapter.class.getName()).log(Level.SEVERE, null, ex);
  }
}

代码示例来源:origin: int.esa.nmf.core/helper-tools

bis = new ByteArrayInputStream(obj.getValue());
ObjectInput in = null;
try {

代码示例来源:origin: int.esa.ccsds.mo/ENCODING_GEN

@Override
public void encodeBlob(final Blob value) throws MALException
{
 try
 {
  checkForNull(value);
  if (value.isURLBased())
  {
   checkForNull(value.getURL());
  }
  else
  {
   checkForNull(value.getValue());
  }
  outputStream.addBytes(value.getValue());
 }
 catch (IOException ex)
 {
  throw new MALException(ENCODING_EXCEPTION_STR, ex);
 }
}

代码示例来源:origin: int.esa.nmf.core.moservices.impl/ccsds-com

@Override
public void encodeBlob(final Blob value) throws MALException
{
 try
 {
  checkForNull(value);
  if (value.isURLBased())
  {
   checkForNull(value.getURL());
  }
  else
  {
   checkForNull(value.getValue());
  }
  outputStream.addBytes(value.getValue());
 }
 catch (IOException ex)
 {
  throw new MALException(ENCODING_EXCEPTION_STR, ex);
 }
}

代码示例来源:origin: int.esa.ccsds.mo/TRANSPORT_TCPIP

/**
 * Encode a blob
 */
@Override
public void encodeBlob(final Blob value) throws MALException {
  byte[] byteValue = value.getValue();
  encodeUInteger(new UInteger(byteValue.length));
  if (value.getLength() > 0) {
    try {
      outputStream.directAdd(byteValue);
    } catch (IOException ex) {
      throw new MALException(ENCODING_EXCEPTION_STR, ex);
    }
  }
}

代码示例来源:origin: int.esa.ccsds.mo/TRANSPORT_GEN

final ByteArrayInputStream lbais = new ByteArrayInputStream(ele.getValue());
lenc = encFactory.createInputStream(lbais);

代码示例来源:origin: int.esa.nmf.core.moservices.impl/ccsds-com

@Override
public void encodeNullableBlob(final Blob value) throws MALException
{
 try
 {
  if ((null != value)
      && ((value.isURLBased() && (null != value.getURL()))
      || (!value.isURLBased() && (null != value.getValue()))))
  {
   encodeBlob(value);
  }
  else
  {
   outputStream.addBytes((byte[]) null);
  }
 }
 catch (IOException ex)
 {
  throw new MALException(ENCODING_EXCEPTION_STR, ex);
 }
}

代码示例来源:origin: int.esa.nmf.core/helper-tools

return Arrays.toString(((Blob) in).getValue());
} catch (MALException ex) {

代码示例来源:origin: int.esa.ccsds.mo/ENCODING_GEN

@Override
public void encodeNullableBlob(final Blob value) throws MALException
{
 try
 {
  if ((null != value)
      && ((value.isURLBased() && (null != value.getURL()))
      || (!value.isURLBased() && (null != value.getValue()))))
  {
   outputStream.addNotNull();
   encodeBlob(value);
  }
  else
  {
   outputStream.addIsNull();
  }
 }
 catch (IOException ex)
 {
  throw new MALException(ENCODING_EXCEPTION_STR, ex);
 }
}

代码示例来源:origin: int.esa.nmf.core.moservices.impl/ccsds-com

final BinaryDecoder binDec = new BinaryDecoder(blob.getValue());
final MALElementFactory eleFact = MALContextFactory.getElementFactoryRegistry().lookupElementFactory(binDec.decodeLong());
elem = binDec.decodeNullableElement((Element) eleFact.createElement());

代码示例来源:origin: int.esa.nmf.core.moservices.impl/ccsds-com

@Override
public void encodeNullableBlob(final Blob value) throws MALException
{
 try
 {
  if ((null != value)
      && ((value.isURLBased() && (null != value.getURL()))
      || (!value.isURLBased() && (null != value.getValue()))))
  {
   outputStream.addNotNull();
   encodeBlob(value);
  }
  else
  {
   outputStream.addIsNull();
  }
 }
 catch (IOException ex)
 {
  throw new MALException(ENCODING_EXCEPTION_STR, ex);
 }
}

代码示例来源:origin: int.esa.ccsds.mo/TRANSPORT_GEN

/**
 * Decodes a single part of the message body.
 *
 * @param meel The encoded element list.
 * @return The decoded chunk.
 * @throws MALException if any error detected.
 */
protected Object decodeEncodedElementListBodyPart(final MALEncodedElementList meel) throws MALException
{
 long sf = (Long) meel.getShortForm();
 final MALElementFactory ef = MALContextFactory.getElementFactoryRegistry().lookupElementFactory(sf);
 if (null == ef)
 {
  throw new MALException("GEN transport unable to find element factory for short type: " + sf);
 }
 // create list of correct type
 long lsf = (-((sf) & 0xFFFFFFL)) & 0xFFFFFFL + (sf & 0xFFFFFFFFFF000000L);
 ElementList rv = (ElementList) MALContextFactory.getElementFactoryRegistry().lookupElementFactory(lsf).createElement();
 for (MALEncodedElement ele : meel)
 {
  final ByteArrayInputStream lbais = new ByteArrayInputStream(ele.getEncodedElement().getValue());
  MALElementInputStream lenc = encFactory.createInputStream(lbais);
  rv.add(lenc.readElement(ef.createElement(), ctx));
 }
 return rv;
}

代码示例来源:origin: int.esa.ccsds.mo/TRANSPORT_GEN

lowLevelOutputStream.write(((MALEncodedBody) messageParts[0]).getEncodedBody().getValue());
lowLevelOutputStream.flush();
lowLevelOutputStream.write(getEncodedBody().getEncodedBody().getValue());
lowLevelOutputStream.flush();

代码示例来源:origin: int.esa.ccsds.mo/TRANSPORT_GEN

final ByteArrayInputStream bais = new ByteArrayInputStream(body.getValue());
benc = encFactory.createInputStream(bais);

相关文章