src/hotspot/share/classfile/classFileStream.hpp
changeset 54257 21702e87efdf
parent 54042 6dd6f988b4e4
equal deleted inserted replaced
54256:aa937fac07f3 54257:21702e87efdf
    42   const u1* const _buffer_start; // Buffer bottom
    42   const u1* const _buffer_start; // Buffer bottom
    43   const u1* const _buffer_end;   // Buffer top (one past last element)
    43   const u1* const _buffer_end;   // Buffer top (one past last element)
    44   mutable const u1* _current;    // Current buffer position
    44   mutable const u1* _current;    // Current buffer position
    45   const char* const _source;     // Source of stream (directory name, ZIP/JAR archive name)
    45   const char* const _source;     // Source of stream (directory name, ZIP/JAR archive name)
    46   bool _need_verify;             // True if verification is on for the class file
    46   bool _need_verify;             // True if verification is on for the class file
    47 
    47   bool _from_boot_loader_modules_image;  // True if this was created by ClassPathImageEntry.
    48   void truncated_file_error(TRAPS) const ;
    48   void truncated_file_error(TRAPS) const ;
    49 
    49 
    50  protected:
    50  protected:
    51   const u1* clone_buffer() const;
    51   const u1* clone_buffer() const;
    52   const char* const clone_source() const;
    52   const char* const clone_source() const;
    55   static const bool verify;
    55   static const bool verify;
    56 
    56 
    57   ClassFileStream(const u1* buffer,
    57   ClassFileStream(const u1* buffer,
    58                   int length,
    58                   int length,
    59                   const char* source,
    59                   const char* source,
    60                   bool verify_stream = verify); // to be verified by default
    60                   bool verify_stream = verify,  // to be verified by default
       
    61                   bool from_boot_loader_modules_image = false);
    61 
    62 
    62   virtual const ClassFileStream* clone() const;
    63   virtual const ClassFileStream* clone() const;
    63 
    64 
    64   // Buffer access
    65   // Buffer access
    65   const u1* buffer() const { return _buffer_start; }
    66   const u1* buffer() const { return _buffer_start; }
    75     return (juint)(_current - _buffer_start);
    76     return (juint)(_current - _buffer_start);
    76   }
    77   }
    77   const char* source() const { return _source; }
    78   const char* source() const { return _source; }
    78   bool need_verify() const { return _need_verify; }
    79   bool need_verify() const { return _need_verify; }
    79   void set_verify(bool flag) { _need_verify = flag; }
    80   void set_verify(bool flag) { _need_verify = flag; }
       
    81   bool from_boot_loader_modules_image() const { return _from_boot_loader_modules_image; }
    80 
    82 
    81   void check_truncated_file(bool b, TRAPS) const {
    83   void check_truncated_file(bool b, TRAPS) const {
    82     if (b) {
    84     if (b) {
    83       truncated_file_error(THREAD);
    85       truncated_file_error(THREAD);
    84     }
    86     }