Same as {@link #marshallArray(Object[], ObjectOutput)} but specialized for byte arrays.

@see #marshallArray(Object[], ObjectOutput).
17003
public static void marshallByteArray(byte[] array, ObjectOutput out) throws IOException {
      final int size = array == null ? NULL_VALUE : array.length;
      marshallSize(out, size);
      if (size <= 0) {
         return;
      }
      out.write(array);
   }
1286328
public final static Object toPrimitiveArray(final Object array) {
        if (!array.getClass().isArray()) {
            return array;
        }
        final Class<?> clazz = OBJ_TO_PRIMITIVE.get(array.getClass().getComponentType());
        return setArray(clazz, array);
    }
312835
function marshalList(item, marshal) {
  return transform(_.isArray, _.compose(objOf('L'), _.map(marshal)), item);
}
286930
@Nonnull
  @OverrideOnDemand
  protected Marshaller createMarshaller () throws JAXBException
  {
    final JAXBContext aJAXBContext = getJAXBContext ();

    // create a Marshaller
    final Marshaller aMarshaller = aJAXBContext.createMarshaller ();

    // Validating (if possible)
    final Schema aSchema = getSchema ();
    if (aSchema != null)
      aMarshaller.setSchema (aSchema);

    return aMarshaller;
  }
908580
public Marshaller getMarshaller(T instance) throws JAXBException {
    JAXBContext context = JAXBContext.newInstance(instance.getClass());
    Marshaller marshaller = context.createMarshaller();
    marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
    return marshaller;
  }
136031
public byte[] marshall() {
        if (marshall == null) {
            marshall = Utilities.marshallEnhanced(COMMAND, identifier,
                    expiry, deviceToken, payload);
        }
        return marshall.clone();
    }
458418
public WebServiceTemplateBuilder setMarshaller(Marshaller marshaller) {
		return new WebServiceTemplateBuilder(this.detectHttpMessageSender,
				this.interceptors, this.internalCustomizers, this.customizers,
				this.messageSenders, marshaller, this.unmarshaller,
				this.destinationProvider, this.transformerFactoryClass,
				this.messageFactory);
	}
1180086
public static Byte[] toObject(byte[] array) {
        if (array == null) {
            return null;
        } else if (array.length == 0) {
            return EMPTY_BYTE_OBJECT_ARRAY;
        }
        final Byte[] result = new Byte[array.length];
        for (int i = 0; i < array.length; i++) {
            result[i] = array[i];
        }
        return result;
    }
513847
public final static void writeByteArray(final byte[] a, final ObjectOutputStream s) throws IOException {
		writeVByte(a.length, s);
		s.write(a);
	}
805088
@Override
    public ByteArray readByteArray() {
        int type = readInteger();
        if ((type & 1) == 0) {
            return (ByteArray) getReference(type >> 1);
        }
        type >>= 1;
        ByteArray result = new ByteArray(buf, type);
        storeReference(result);
        return result;
    }
902306
public Vector<Object> marshallize()
    {
        Vector<Object> parameters = super.marshallize();
        Vector<Object> suts = XmlRpcDataMarshaller.toXmlRpcSystemUnderTestsParameters(targetedSystemUnderTests);
        parameters.add(SPECIFICATION_SUTS_IDX, suts);
        if (isNotBlank(dialectClass)) {
            parameters.add(SPECIFICATION_DIALECT_IDX, dialectClass);
        }
        return parameters;
    }
202439
@Override
	byte[] toByteArray(final ByteArrayOutputStream os)
	{
		os.write(4);
		os.write(state);
		os.write(lost >> 8);
		os.write(lost);
		return os.toByteArray();
	}
475895
public byte[] toByteArray() throws IOException {
    // TODO: in the future actual serialization here should be done using protobufs
    ByteArrayOutputStream bos = new ByteArrayOutputStream();
    write(new DataOutputStream(bos));
    return bos.toByteArray();
  }
99851
public byte[] toByteArray() {
        try {
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            ObjectOutputStream oos = new ObjectOutputStream(baos);
            oos.writeObject(this);
            return baos.toByteArray();
        } catch (IOException e) {
            throw E.ioException(e);
        }
    }
599379
@Override
	byte[] toByteArray(final ByteArrayOutputStream os)
	{
		os.write(channelid);
		os.write(0);
		final byte[] buf = endpt.toByteArray();
		os.write(buf, 0, buf.length);
		return os.toByteArray();
	}
411976
@Override
    public void writeExternal(ObjectOutput output) throws IOException {
        output.writeInt(SERIALIZATION_V2);
        output.writeInt(this.storage.size());
        output.writeInt(this.numberOfHeaders);
        int count = 0;
        HeaderElement elem = this.hdrSequence;
        while (null != elem) {
            if (!elem.wasRemoved()) {
                count++;
                writeByteArray(output, elem.getKey().getByteArray());
                writeByteArray(output, elem.asBytes());
            }
            elem = elem.nextSequence;
        }
        // double check the counter value
        if (count != this.numberOfHeaders) {
            throw new IOException("Expected " + this.numberOfHeaders
                                  + " headers but wrote " + count);
        }
    }
604871
@Override
    public WsByteBuffer[] marshallLine() {
        WsByteBuffer[] firstLine = new WsByteBuffer[1];
        firstLine[0] = allocateBuffer(getOutgoingBufferSize());

        firstLine = putBytes(this.myMethod.getByteArray(), firstLine);
        firstLine = putByte(SPACE, firstLine);
        firstLine = putBytes(getMarshalledSecondToken(), firstLine);
        firstLine = putByte(SPACE, firstLine);
        firstLine = putBytes(getVersionValue().getByteArray(), firstLine);
        firstLine = putBytes(BNFHeaders.EOL, firstLine);
        // don't flip the last buffer as headers get tacked on the end
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            String url = GenericUtils.nullOutPasswords(getMarshalledSecondToken(), (byte) '&');
            Tr.event(tc, "Marshalling first line: " + getMethod() + " " + url + " " + getVersion());
        }
        return firstLine;
    }