Package org.hibernate.jpa.boot.archive.spi

Examples of org.hibernate.jpa.boot.archive.spi.ArchiveEntry


      final String name = localFile.getAbsolutePath();
      final String relativeName = path + localFile.getName();
      final InputStreamAccess inputStreamAccess = new FileInputStreamAccess( name, localFile );

      final ArchiveEntry entry = new ArchiveEntry() {
        @Override
        public String getName() {
          return name;
        }
View Full Code Here


                  zipEntry.getName()
              )
          );
        }

        final ArchiveEntry entry = new ArchiveEntry() {
          @Override
          public String getName() {
            return name;
          }
View Full Code Here

                if ( ! subZipEntry.isDirectory() ) {
                  final String subName = extractName( subZipEntry );
                  final InputStreamAccess inputStreamAccess
                      = buildByteBasedInputStreamAccess( subName, subJarInputStream );

                  final ArchiveEntry entry = new ArchiveEntry() {
                    @Override
                    public String getName() {
                      return subName;
                    }

                    @Override
                    public String getNameWithinArchive() {
                      return subName;
                    }

                    @Override
                    public InputStreamAccess getStreamAccess() {
                      return inputStreamAccess;
                    }
                  };

                  context.obtainArchiveEntryHandler( entry ).handleEntry( entry, context );
                }
                subZipEntry = jarInputStream.getNextJarEntry();
              }
            }
            finally {
              subJarInputStream.close();
            }
          }
          catch (Exception e) {
            throw new ArchiveException( "Error accessing nested jar", e );
          }
        }
        else {
          final String entryName = extractName( jarEntry );
          final InputStreamAccess inputStreamAccess
              = buildByteBasedInputStreamAccess( entryName, jarInputStream );

          final String relativeName = extractRelativeName( jarEntry );

          final ArchiveEntry entry = new ArchiveEntry() {
            @Override
            public String getName() {
              return entryName;
            }
View Full Code Here

                final String name = extractName( subZipEntry );
                final String relativeName = extractRelativeName( subZipEntry );
                final InputStreamAccess inputStreamAccess
                    = buildByteBasedInputStreamAccess( name, jarInputStream );

                final ArchiveEntry entry = new ArchiveEntry() {
                  @Override
                  public String getName() {
                    return name;
                  }

                  @Override
                  public String getNameWithinArchive() {
                    return relativeName;
                  }

                  @Override
                  public InputStreamAccess getStreamAccess() {
                    return inputStreamAccess;
                  }
                };

                final ArchiveEntryHandler entryHandler = context.obtainArchiveEntryHandler( entry );
                entryHandler.handleEntry( entry, context );
              }

              subZipEntry = jarInputStream.getNextEntry();
            }
          }
          finally {
            is.close();
          }
        }
        catch (Exception e) {
          throw new ArchiveException( "Error accessing JarFile entry [" + zipEntry.getName() + "]", e );
        }
      }
      else {
        final String name = extractName( zipEntry );
        final String relativeName = extractRelativeName( zipEntry );
        final InputStreamAccess inputStreamAccess;
        try {
          inputStreamAccess = buildByteBasedInputStreamAccess( name, jarFile.getInputStream( zipEntry ) );
        }
        catch (IOException e) {
          throw new ArchiveException(
              String.format(
                  "Unable to access stream from jar file [%s] for entry [%s]",
                  jarFile.getName(),
                  zipEntry.getName()
              )
          );
        }

        final ArchiveEntry entry = new ArchiveEntry() {
          @Override
          public String getName() {
            return name;
          }
View Full Code Here

              }
            }
           
          };
         
          final ArchiveEntry entry = new ArchiveEntry() {
            @Override
            public String getName() {
              return resource;
            }
 
View Full Code Here

      final String name = localFile.getAbsolutePath();
      final String relativeName = path + localFile.getName();
      final InputStreamAccess inputStreamAccess = new FileInputStreamAccess( name, localFile );

      final ArchiveEntry entry = new ArchiveEntry() {
        @Override
        public String getName() {
          return name;
        }
View Full Code Here

                  zipEntry.getName()
              )
          );
        }

        final ArchiveEntry entry = new ArchiveEntry() {
          @Override
          public String getName() {
            return name;
          }
View Full Code Here

                if ( ! subZipEntry.isDirectory() ) {
                  final String subName = extractName( subZipEntry );
                  final InputStreamAccess inputStreamAccess
                      = buildByteBasedInputStreamAccess( subName, subJarInputStream );

                  final ArchiveEntry entry = new ArchiveEntry() {
                    @Override
                    public String getName() {
                      return subName;
                    }

                    @Override
                    public String getNameWithinArchive() {
                      return subName;
                    }

                    @Override
                    public InputStreamAccess getStreamAccess() {
                      return inputStreamAccess;
                    }
                  };

                  context.obtainArchiveEntryHandler( entry ).handleEntry( entry, context );
                }
                subZipEntry = jarInputStream.getNextJarEntry();
              }
            }
            finally {
              subJarInputStream.close();
            }
          }
          catch (Exception e) {
            throw new ArchiveException( "Error accessing nested jar", e );
          }
        }
        else {
          final String entryName = extractName( jarEntry );
          final InputStreamAccess inputStreamAccess
              = buildByteBasedInputStreamAccess( entryName, jarInputStream );

          final String relativeName = extractRelativeName( jarEntry );

          final ArchiveEntry entry = new ArchiveEntry() {
            @Override
            public String getName() {
              return entryName;
            }
View Full Code Here

                final String name = extractName( subZipEntry );
                final String relativeName = extractRelativeName( subZipEntry );
                final InputStreamAccess inputStreamAccess
                    = buildByteBasedInputStreamAccess( name, jarInputStream );

                final ArchiveEntry entry = new ArchiveEntry() {
                  @Override
                  public String getName() {
                    return name;
                  }

                  @Override
                  public String getNameWithinArchive() {
                    return relativeName;
                  }

                  @Override
                  public InputStreamAccess getStreamAccess() {
                    return inputStreamAccess;
                  }
                };

                final ArchiveEntryHandler entryHandler = context.obtainArchiveEntryHandler( entry );
                entryHandler.handleEntry( entry, context );
              }

              subZipEntry = jarInputStream.getNextEntry();
            }
          }
          finally {
            is.close();
          }
        }
        catch (Exception e) {
          throw new ArchiveException( "Error accessing JarFile entry [" + zipEntry.getName() + "]", e );
        }
      }
      else {
        final String name = extractName( zipEntry );
        final String relativeName = extractRelativeName( zipEntry );
        final InputStreamAccess inputStreamAccess;
        try {
          inputStreamAccess = buildByteBasedInputStreamAccess( name, jarFile.getInputStream( zipEntry ) );
        }
        catch (IOException e) {
          throw new ArchiveException(
              String.format(
                  "Unable to access stream from jar file [%s] for entry [%s]",
                  jarFile.getName(),
                  zipEntry.getName()
              )
          );
        }

        final ArchiveEntry entry = new ArchiveEntry() {
          @Override
          public String getName() {
            return name;
          }
View Full Code Here

      final String name = localFile.getAbsolutePath();
      final String relativeName = path + localFile.getName();
      final InputStreamAccess inputStreamAccess = new FileInputStreamAccess( name, localFile );

      final ArchiveEntry entry = new ArchiveEntry() {
        @Override
        public String getName() {
          return name;
        }
View Full Code Here

TOP

Related Classes of org.hibernate.jpa.boot.archive.spi.ArchiveEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.