org.apache.uima.fit.util

## Class CasIOUtil

- java.lang.Object
- - org.apache.uima.fit.util.CasIOUtil

- Deprecated.
  Since UIMA 2.9.0 the core class `CasIOUtils` should be used.

      @Deprecated
      public class CasIOUtil
      extends Object

  Convenience methods for loading and saving CAS to disk.

- - ### Method Summary

    All Methods Static Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `readCas(org.apache.uima.cas.CAS aCas, File aFile)` Deprecated. Use `CasIOUtils.load(java.net.URL, CAS)` instead.
    `static void` | `readJCas(org.apache.uima.jcas.JCas aJCas, File aFile)` Deprecated. Use `CasIOUtils.load(java.net.URL, CAS)` instead.
    `static void` | `readXCas(org.apache.uima.cas.CAS aCas, File aFile)` Deprecated. Use `CasIOUtils.load(java.net.URL, CAS)` instead.
    `static void` | `readXCas(org.apache.uima.jcas.JCas aJCas, File aFile)` Deprecated. Use `CasIOUtils.load(java.net.URL, CAS)` instead.
    `static void` | `readXmi(org.apache.uima.cas.CAS aCas, File aFile)` Deprecated. Use `CasIOUtils.load(java.net.URL, CAS)` instead.
    `static void` | `readXmi(org.apache.uima.jcas.JCas aJCas, File aFile)` Deprecated. Use `CasIOUtils.load(java.net.URL, CAS)` instead.
    `static void` | `writeXCas(org.apache.uima.cas.CAS aCas, File aFile)` Deprecated. Use `CasIOUtils.save(CAS, OutputStream, org.apache.uima.cas.SerialFormat)` with `SerialFormat.XCAS` instead.
    `static void` | `writeXCas(org.apache.uima.jcas.JCas aJCas, File aFile)` Deprecated. Use `CasIOUtils.save(CAS, OutputStream, org.apache.uima.cas.SerialFormat)` with `SerialFormat.XCAS` instead.
    `static void` | `writeXmi(org.apache.uima.cas.CAS aCas, File aFile)` Deprecated. Use `CasIOUtils.save(CAS, OutputStream, org.apache.uima.cas.SerialFormat)` with `SerialFormat.XMI` instead.
    `static void` | `writeXmi(org.apache.uima.jcas.JCas aJCas, File aFile)` Deprecated. Use `CasIOUtils.save(CAS, OutputStream, org.apache.uima.cas.SerialFormat)` with `SerialFormat.XMI` instead.

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

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

- - ### Method Detail

    - #### readCas

          @Deprecated
          public static void readCas(org.apache.uima.cas.CAS aCas,
                                                 File aFile)
                                          throws IOException

      Deprecated. Use `CasIOUtils.load(java.net.URL, CAS)` instead.
      This method loads the contents of an XMI or XCAS file into the given CAS. The file type is detected by the extension.
      Parameters:
        `aCas` - the target CAS
        `aFile` - the file to read from
      Throws:
        `IOException` - if there is a problem reading the file

    - #### readXmi

          @Deprecated
          public static void readXmi(org.apache.uima.cas.CAS aCas,
                                                 File aFile)
                                          throws IOException

      Deprecated. Use `CasIOUtils.load(java.net.URL, CAS)` instead.
      Parameters:
        `aCas` - the target CAS
        `aFile` - the file to read from
      Throws:
        `IOException` - if there is a problem reading the file

    - #### writeXmi

          @Deprecated
          public static void writeXmi(org.apache.uima.cas.CAS aCas,
                                                  File aFile)
                                           throws IOException

      Deprecated. Use `CasIOUtils.save(CAS, OutputStream, org.apache.uima.cas.SerialFormat)` with `SerialFormat.XMI` instead.
      Parameters:
        `aCas` - the source CAS
        `aFile` - the file to write to
      Throws:
        `IOException` - if there is a problem writing the file

    - #### readXCas

          @Deprecated
          public static void readXCas(org.apache.uima.cas.CAS aCas,
                                                  File aFile)
                                           throws IOException

      Deprecated. Use `CasIOUtils.load(java.net.URL, CAS)` instead.
      Parameters:
        `aCas` - the target CAS
        `aFile` - the file to read from
      Throws:
        `IOException` - if there is a problem reading the file

    - #### writeXCas

          @Deprecated
          public static void writeXCas(org.apache.uima.cas.CAS aCas,
                                                   File aFile)
                                            throws IOException

      Deprecated. Use `CasIOUtils.save(CAS, OutputStream, org.apache.uima.cas.SerialFormat)` with `SerialFormat.XCAS` instead.
      Parameters:
        `aCas` - the source CAS
        `aFile` - the file to write to
      Throws:
        `IOException` - if there is a problem writing the file

    - #### readJCas

          @Deprecated
          public static void readJCas(org.apache.uima.jcas.JCas aJCas,
                                                  File aFile)
                                           throws IOException

      Deprecated. Use `CasIOUtils.load(java.net.URL, CAS)` instead.
      This method loads the contents of an XMI or XCAS file into the given CAS. The file type is detected by the extension.
      Parameters:
        `aJCas` - the target JCas
        `aFile` - the file to read from
      Throws:
        `IOException` - if there is a problem reading the file

    - #### readXmi

          @Deprecated
          public static void readXmi(org.apache.uima.jcas.JCas aJCas,
                                                 File aFile)
                                          throws IOException

      Deprecated. Use `CasIOUtils.load(java.net.URL, CAS)` instead.
      Parameters:
        `aJCas` - the target JCas
        `aFile` - the file to read from
      Throws:
        `IOException` - if there is a problem reading the file

    - #### writeXmi

          @Deprecated
          public static void writeXmi(org.apache.uima.jcas.JCas aJCas,
                                                  File aFile)
                                           throws IOException

      Deprecated. Use `CasIOUtils.save(CAS, OutputStream, org.apache.uima.cas.SerialFormat)` with `SerialFormat.XMI` instead.
      Parameters:
        `aJCas` - the source JCas
        `aFile` - the file to write to
      Throws:
        `IOException` - if there is a problem writing the file

    - #### readXCas

          @Deprecated
          public static void readXCas(org.apache.uima.jcas.JCas aJCas,
                                                  File aFile)
                                           throws IOException

      Deprecated. Use `CasIOUtils.load(java.net.URL, CAS)` instead.
      Parameters:
        `aJCas` - the target JCas
        `aFile` - the file to read from
      Throws:
        `IOException` - if there is a problem reading the file

    - #### writeXCas

          @Deprecated
          public static void writeXCas(org.apache.uima.jcas.JCas aJCas,
                                                   File aFile)
                                            throws IOException

      Deprecated. Use `CasIOUtils.save(CAS, OutputStream, org.apache.uima.cas.SerialFormat)` with `SerialFormat.XCAS` instead.
      Parameters:
        `aJCas` - the source JCas
        `aFile` - the file to write to
      Throws:
        `IOException` - if there is a problem writing the file

Copyright © 2012–2020 The Apache Software Foundation. All rights reserved.