Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for SectionReader (0.16 sec)

  1. src/debug/pe/section.go

    // Section provides access to PE COFF section.
    type Section struct {
    	SectionHeader
    	Relocs []Reloc
    
    	// Embed ReaderAt for ReadAt method.
    	// Do not embed SectionReader directly
    	// to avoid having Read and Seek.
    	// If a client wants Read and Seek it must use
    	// Open() to avoid fighting over the seek offset
    	// with other clients.
    	io.ReaderAt
    	sr *io.SectionReader
    }
    
    // Data reads and returns the contents of the PE section s.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 18 19:33:30 UTC 2023
    - 3.5K bytes
    - Viewed (0)
  2. src/io/io.go

    		// Assume we can read up to an offset of 1<<63 - 1.
    		remaining = maxint64
    	}
    	return &SectionReader{r, off, off, remaining, n}
    }
    
    // SectionReader implements Read, Seek, and ReadAt on a section
    // of an underlying [ReaderAt].
    type SectionReader struct {
    	r     ReaderAt // constant after creation
    	base  int64    // constant after creation
    	off   int64
    	limit int64 // constant after creation
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 17:34:10 UTC 2024
    - 21.6K bytes
    - Viewed (0)
  3. src/internal/saferio/io_test.go

    	t.Run("maxint", func(t *testing.T) {
    		_, err := ReadDataAt(bytes.NewReader(input), 1<<62, 0)
    		if err == nil {
    			t.Error("large read succeeded unexpectedly")
    		}
    	})
    
    	t.Run("SectionReader", func(t *testing.T) {
    		// Reading 0 bytes from an io.SectionReader at the end
    		// of the section will return EOF, but ReadDataAt
    		// should succeed and return 0 bytes.
    		sr := io.NewSectionReader(bytes.NewReader(input), 0, 0)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 31 00:34:05 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  4. src/debug/plan9obj/file.go

    	closer   io.Closer
    }
    
    // A SectionHeader represents a single Plan 9 a.out section header.
    // This structure doesn't exist on-disk, but eases navigation
    // through the object file.
    type SectionHeader struct {
    	Name   string
    	Size   uint32
    	Offset uint32
    }
    
    // A Section represents a single section in a Plan 9 a.out file.
    type Section struct {
    	SectionHeader
    
    	// Embed ReaderAt for ReadAt method.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 18 19:33:30 UTC 2023
    - 7.2K bytes
    - Viewed (0)
  5. src/internal/saferio/io.go

    		// a buffer large enough. Treat this as a read failure.
    		return nil, io.ErrUnexpectedEOF
    	}
    
    	if n < chunk {
    		buf := make([]byte, n)
    		_, err := r.ReadAt(buf, off)
    		if err != nil {
    			// io.SectionReader can return EOF for n == 0,
    			// but for our purposes that is a success.
    			if err != io.EOF || n > 0 {
    				return nil, err
    			}
    		}
    		return buf, nil
    	}
    
    	var buf []byte
    	buf1 := make([]byte, chunk)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 31 00:34:05 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  6. src/debug/macho/file.go

    	Scattered bool
    }
    
    type Section struct {
    	SectionHeader
    	Relocs []Reloc
    
    	// Embed ReaderAt for ReadAt method.
    	// Do not embed SectionReader directly
    	// to avoid having Read and Seek.
    	// If a client wants Read and Seek it must use
    	// Open() to avoid fighting over the seek offset
    	// with other clients.
    	io.ReaderAt
    	sr *io.SectionReader
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 18 19:33:30 UTC 2023
    - 17.9K bytes
    - Viewed (0)
  7. src/internal/xcoff/ar.go

    // ArchiveHeader holds information about a big archive file header
    type ArchiveHeader struct {
    	magic string
    }
    
    // Member represents a member of an AIX big archive.
    type Member struct {
    	MemberHeader
    	sr *io.SectionReader
    }
    
    // MemberHeader holds information about a big archive member
    type MemberHeader struct {
    	Name string
    	Size uint64
    }
    
    // OpenArchive opens the named archive using os.Open and prepares it for use
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:32:51 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  8. src/mime/multipart/formdata.go

    type File interface {
    	io.Reader
    	io.ReaderAt
    	io.Seeker
    	io.Closer
    }
    
    // helper types to turn a []byte into a File
    
    type sectionReadCloser struct {
    	*io.SectionReader
    	io.Closer
    }
    
    func (rc sectionReadCloser) Close() error {
    	if rc.Closer != nil {
    		return rc.Closer.Close()
    	}
    	return nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 21 16:12:35 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  9. api/go1.22.txt

    pkg go/version, func Compare(string, string) int #62039
    pkg go/version, func IsValid(string) bool #62039
    pkg go/version, func Lang(string) string #62039
    pkg html/template, const ErrJSTemplate //deprecated #61619
    pkg io, method (*SectionReader) Outer() (ReaderAt, int64, int64) #61870
    pkg log/slog, func SetLogLoggerLevel(Level) Level #62418
    pkg math/big, method (*Rat) FloatPrec() (int, bool) #50489
    pkg math/rand/v2, func ExpFloat64() float64 #61716
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 24 20:54:27 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  10. src/debug/elf/file.go

    type File struct {
    	FileHeader
    	Sections  []*Section
    	Progs     []*Prog
    	closer    io.Closer
    	gnuNeed   []verneed
    	gnuVersym []byte
    }
    
    // A SectionHeader represents a single ELF section header.
    type SectionHeader struct {
    	Name      string
    	Type      SectionType
    	Flags     SectionFlag
    	Addr      uint64
    	Offset    uint64
    	Size      uint64
    	Link      uint32
    	Info      uint32
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 23 16:49:58 UTC 2024
    - 43.1K bytes
    - Viewed (0)
Back to top