ByteArraySerializer (Apache OpenNLP :: Core :: Runtime 3.0.0-M4 API)
Description: declaration: package: opennlp.tools.util.model, class: ByteArraySerializer

Package opennlp.tools.util.model

# Class ByteArraySerializer

java.lang.Object
opennlp.tools.util.model.ByteArraySerializer

All Implemented Interfaces:
  `opennlp.tools.util.model.ArtifactSerializer<byte[]>`

public class ByteArraySerializer extends Object implements opennlp.tools.util.model.ArtifactSerializer<byte[]>
An `ArtifactSerializer` implementation for binary data, kept in `byte[]`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ByteArraySerializer()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `byte[]`
  `create(InputStream in)`
  `void`
  `serialize(byte[] artifact, OutputStream out)`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ByteArraySerializer

    public ByteArraySerializer()

- ## Method Details

  - ### create

    public byte[] create(InputStream in) throws IOException
    Specified by:
      `create` in interface `opennlp.tools.util.model.ArtifactSerializer<byte[]>`
    Throws:
      `IOException`

  - ### serialize

    public void serialize(byte[] artifact, OutputStream out) throws IOException
    Specified by:
      `serialize` in interface `opennlp.tools.util.model.ArtifactSerializer<byte[]>`
    Throws:
      `IOException`