Gives back the serialized LogRecord as an arrays of bytes.

@return ObjectManagerByteArrayOutputStream[] the buffers containing the serialized LogRecord.
9086
protected ObjectManagerByteArrayOutputStream[] getBuffers()
                    throws ObjectManagerException
    {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this,
                        cclass,
                        "getBuffers");

        ObjectManagerByteArrayOutputStream[] buffers = new ObjectManagerByteArrayOutputStream[1];

        // Create the buffer to contain the header for this log record.
        buffers[0] = new ObjectManagerByteArrayOutputStream(overhead);

        buffers[0].writeInt(LogRecord.TYPE_PADDING);
        buffers[0].writeInt(totalSize - overhead);

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this,
                       cclass,
                       "getBuffers",
                       new Object[] { buffers }
                            );
        return buffers;
    }
342867
public function readLog(): array
    {
        $logFilePath = $this->getLogFilePath();

        if (!file_exists($logFilePath)) {
            return [];
        }

        $data = @unserialize(file_get_contents($logFilePath));

        if (false === $data) {
            throw new \RuntimeException('Could not unserialize log file '.$logFilePath);
        }

        return (array) $data;
    }
245034
public function toArray()
    {
        $result = parent::toArray();

        $result['hasFile'] = false;

        $fileNameOrSerial = $this->getFileNameFromReport();

        if ($fileNameOrSerial) {
            $result['hasFile'] = $this->isFileReferenced($fileNameOrSerial)
                ? true
                : $this->isFileStoredInQueueStorage($fileNameOrSerial);
        }

        return $result;
    }
122024
public byte[] serialize() {
        byte[] value = serializeValue();
        ByteBuffer buffer = ByteBuffer.allocate(value.length + 4);
        buffer.putShort(tag);
        buffer.putShort((short)value.length);
        buffer.put(value);
        return buffer.array();
    }
131155
public byte[] getBytes() {
        if (!changed) {
            return buf;
        }
        
        byte[] newBuf = new byte[bufLen];
        System.arraycopy(buf, 0, newBuf, 0, bufLen);
        buf = newBuf;
        return buf;
    }
675281
public function extractRecordedEvents()
    {
        $eventCollection = $this->eventCollection();
        $eventStream = $eventCollection->stream();
        $eventCollection->commit();
        $this->committedVersion = $eventCollection->committedSequence();

        return $eventStream;
    }
1325386
public function recordedMessages()
    {
        $allRecordedMessages = [];

        foreach ($this->messageRecorders as $messageRecorder) {
            $allRecordedMessages = array_merge($allRecordedMessages, $messageRecorder->recordedMessages());
        }

        return $allRecordedMessages;
    }
770501
public function serialize()
    {
        $data = array(
            // Serialized data ID.
            self::VERSION,
            $this->_headers->getArrayCopy(),
            // TODO: BC
            $this->_eol
        );

        return serialize($data);
    }
255223
public function toArray()
    {
        $span = [
            'id' => (string) $this->id,
            'traceId' => (string) $this->traceId,
            'name' => $this->name,
            'timestamp' => $this->annotationBlock->getStartTimestamp(),
            'duration' => $this->annotationBlock->getDuration(),
            'annotations' => $this->annotationBlock->toArray()
        ];

        if ($this->parentId !== null) {
            $span['parentId'] = (string) $this->parentId;
        }

        if ($this->metadata !== null) {
            $span['binaryAnnotations'] = $this->metadata->toArray();
        }

        return $span;
    }
832781
public function serialize()
    {
        $data = array(
            // Serialized data ID.
            self::VERSION,
            $this->_bytes,
            $this->_eol,
            $this->_hdrCharset,
            $this->_headers,
            $this->_metadata,
            $this->_mimeid,
            $this->_parts,
            $this->_status,
            $this->_transferEncoding
        );

        if (!empty($this->_contents)) {
            $data[] = $this->_readStream($this->_contents);
        }

        return serialize($data);
    }
481347
public static function getJStreams()
	{
		static $streams = array();

		if (!$streams)
		{
			$files = new \DirectoryIterator(__DIR__ . '/Stream');

			/* @var  $file  \DirectoryIterator */
			foreach ($files as $file)
			{
				// Only load for php files.
				if (!$file->isFile() || $file->getExtension() != 'php')
				{
					continue;
				}

				$streams[] = $file->getBasename('.php');
			}
		}

		return $streams;
	}
1242771
public function serialize()
    {
        if ($this->manager) {
            return serialize([
                'pageId' => $this->getPage()->getId(),
                'snapshotId' => $this->snapshot->getId(),
            ]);
        }

        return serialize([]);
    }
457323
public function readArray() {

            $length = $this->stream->readLong();
            $arr = array();
            $this->refList[]&=$arr;
            while($length--) $arr[] = $this->readAMFData();
            return $arr;

        }
881055
public function serialize()
    {
        $cacheables = [];
        foreach ($this->getCacheables() as $cacheable) {
            $cacheables[$cacheable] = $this->{$cacheable};
        }

        return serialize($cacheables);
    }
262629
protected ObjectManagerByteArrayOutputStream[] getBuffers(ObjectManagerByteArrayOutputStream byteArrayOutputStream)
                    throws ObjectManagerException {
        final String methodName = "getBuffers";
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this,
                        cclass,
                        methodName,
                        new Object[] { byteArrayOutputStream });

        ObjectManagerByteArrayOutputStream[] buffers = new ObjectManagerByteArrayOutputStream[1 + tokensToReplace.size()];

        // Create the buffer to contain the header for this log record.
        byteArrayOutputStream.reset();
        buffers[0] = byteArrayOutputStream;
        java.io.DataOutputStream dataOutputStream = new java.io.DataOutputStream(byteArrayOutputStream);
        try {
            dataOutputStream.writeInt(LogRecord.TYPE_CHECKPOINT_TRANSACTION);
            logicalUnitOfWork.writeObject(dataOutputStream);
            dataOutputStream.writeInt(transactionState);
            dataOutputStream.writeInt(tokensToAdd.size());
            dataOutputStream.writeInt(tokensToReplace.size());
            dataOutputStream.writeInt(tokensToOptimisticReplace.size());
            dataOutputStream.writeInt(tokensToDelete.size());
            dataOutputStream.writeInt(tokensToNotify.size());

        } catch (java.io.IOException exception) {
            // No FFDC Code Needed.
            ObjectManager.ffdc.processException(this, cclass, methodName, exception, "1:240:1.8");

            if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
                trace.exit(this,
                           cclass,
                           methodName, new Object[] { exception });
            throw new PermanentIOException(this,
                                           exception);
        } // catch.

        // Write the Add Tokens.
        for (java.util.Iterator tokenIterator = tokensToAdd.iterator(); tokenIterator.hasNext();) {
            Token token = (Token) tokenIterator.next();
            token.writeObject(dataOutputStream);
        } // for ... tokensToAdd.

        // Write the Replace Tokens.
        java.util.Iterator serializedBytesIterator = serializedBytesToReplace.iterator();
        int ibuffer = 1;
        for (java.util.Iterator tokenIterator = tokensToReplace.iterator(); tokenIterator.hasNext();) {
            Token token = (Token) tokenIterator.next();
            token.writeObject(dataOutputStream);
            ObjectManagerByteArrayOutputStream managedObjectBytes = (ObjectManagerByteArrayOutputStream) serializedBytesIterator.next();
            try {
                dataOutputStream.writeInt(managedObjectBytes.getCount());
            } catch (java.io.IOException exception) {
                // No FFDC Code Needed.
                ObjectManager.ffdc.processException(this, cclass, methodName, exception, "1:267:1.8");

                if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
                    trace.exit(this,
                               cclass,
                               methodName,
                               exception);
                throw new PermanentIOException(this,
                                               exception);
            } // catch.
              // Add the the serialized image of the ManagedObject after the header containing all of the
              // tokens.
            buffers[ibuffer++] = managedObjectBytes;
        } // for ... tokensToReplace.

        // Write the Optimistic Replace Tokens.
        for (java.util.Iterator tokenIterator = tokensToOptimisticReplace.iterator(); tokenIterator.hasNext();) {
            Token token = (Token) tokenIterator.next();
            token.writeObject(dataOutputStream);
        } // for ... tokensToOptimisticReplace.

        // Write the Delete Tokens.
        for (java.util.Iterator tokenIterator = tokensToDelete.iterator(); tokenIterator.hasNext();) {
            Token token = (Token) tokenIterator.next();
            token.writeObject(dataOutputStream);
        } // for ... tokensToDelete.

        // Write the Notify Tokens.
        for (java.util.Iterator tokenIterator = tokensToNotify.iterator(); tokenIterator.hasNext();) {
            Token token = (Token) tokenIterator.next();
            token.writeObject(dataOutputStream);
        } // for ... tokensToNotify.

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this,
                       cclass,
                       methodName,
                       new Object[] { buffers });
        return buffers;
    }
1262194
public function aujaSerialize() {
        $result = array();

        $result['type'] = $this->getType();
        $result[$this->getType()] = $this->basicSerialize();

        if ($this->nextPageUrl != null || $this->totalPageUrl != null) {
            $result['paging'] = array();
            if ($this->nextPageUrl != null) {
                $result['paging']['next'] = $this->nextPageUrl;
            }
            if ($this->totalPageUrl != null) {
                $result['paging']['total'] = $this->totalPageUrl;
            }
        }

        return $result;
    }
1277707
public ByteBuffer serializeToByteBuffer() throws IOException {
    final ByteArrayOutputStream stream = new ByteArrayOutputStream();
    final Encoder encoder = EncoderFactory.get().binaryEncoder(stream, null);
    final DatumWriter writer = new GenericDatumWriter<GenericRecord>();
    writer.setSchema(createAvroSchema());
    final AvroParquetReader<GenericRecord> reader = createAvroReader();

    GenericRecord record = reader.read();
    while (record != null) {
      writer.write(record, encoder);
      record = reader.read();
    }

    try {
      reader.close();
    } catch (IOException ex){
      LOG.log(Level.SEVERE, ex.getMessage());
      throw ex;
    }

    encoder.flush();
    final ByteBuffer buf = ByteBuffer.wrap(stream.toByteArray());
    buf.order(ByteOrder.LITTLE_ENDIAN);
    return buf;
  }