Class ByteArrayResourceAccessor

  • All Implemented Interfaces:
    liquibase.resource.ResourceAccessor

    public class ByteArrayResourceAccessor
    extends Object
    implements liquibase.resource.ResourceAccessor
    Special ResourceAccessor which can be used to load the Liquibase XML changelog from a byte array.
    Author:
    Filip Hrisafov
    • Field Detail

      • path

        protected final String path
      • bytes

        protected final byte[] bytes
      • delegatingResourceAccessor

        protected final liquibase.resource.ResourceAccessor delegatingResourceAccessor
        The delegating accessor that would be used for all resources, except the one with the defined path.
    • Constructor Detail

      • ByteArrayResourceAccessor

        public ByteArrayResourceAccessor​(String path,
                                         byte[] bytes)
      • ByteArrayResourceAccessor

        public ByteArrayResourceAccessor​(String path,
                                         byte[] bytes,
                                         liquibase.resource.ResourceAccessor delegatingResourceAccessor)
    • Method Detail

      • openStreams

        public liquibase.resource.InputStreamList openStreams​(String relativeTo,
                                                              String streamPath)
                                                       throws IOException
        Specified by:
        openStreams in interface liquibase.resource.ResourceAccessor
        Throws:
        IOException
      • describeLocations

        public SortedSet<String> describeLocations()
        Specified by:
        describeLocations in interface liquibase.resource.ResourceAccessor
      • list

        public SortedSet<String> list​(String relativeTo,
                                      String path,
                                      boolean includeFiles,
                                      boolean includeDirectories,
                                      boolean recursive)
                               throws IOException
        Specified by:
        list in interface liquibase.resource.ResourceAccessor
        Throws:
        IOException