core/src/main/java/org/apache/commons/vfs2/provider/tar/TarEntry.java
/**
     * Parse an entry's header information from a header buffer.
     *
     * @param header The tar entry header buffer to get information from.
     */
Parse an entry's header information from a header buffer.
@param header The tar entry header buffer to get information from.
Parse an entry ' s header information from a header buffer . @param header The tar entry header buffer to get information from .
private void parseTarHeader(final byte[] header)
    {
        int offset = 0;
        name = TarUtils.parseName(header, offset, NAMELEN);
        offset += NAMELEN;
        mode = (int) TarUtils.parseOctal(header, offset, TarConstants.MODELEN);
        offset += TarConstants.MODELEN;
        userID = (int) TarUtils.parseOctal(header, offset, TarConstants.UIDLEN);
        offset += TarConstants.UIDLEN;
        groupID = (int) TarUtils.parseOctal(header, offset, TarConstants.GIDLEN);
        offset += TarConstants.GIDLEN;
        size = TarUtils.parseOctal(header, offset, TarConstants.SIZELEN);
        offset += TarConstants.SIZELEN;
        modTime = TarUtils.parseOctal(header, offset, TarConstants.MODTIMELEN);
        offset += TarConstants.MODTIMELEN;
        checkSum = (int) TarUtils.parseOctal(header, offset, TarConstants.CHKSUMLEN);
        offset += TarConstants.CHKSUMLEN;
        linkFlag = header[offset++];
        linkName = TarUtils.parseName(header, offset, NAMELEN);
        offset += NAMELEN;
        magic = TarUtils.parseName(header, offset, TarConstants.MAGICLEN);
        offset += TarConstants.MAGICLEN;
        userName = TarUtils.parseName(header, offset, TarConstants.UNAMELEN);
        offset += TarConstants.UNAMELEN;
        groupName = TarUtils.parseName(header, offset, TarConstants.GNAMELEN);
        offset += TarConstants.GNAMELEN;
        devMajor = (int) TarUtils.parseOctal(header, offset, TarConstants.DEVLEN);
        offset += TarConstants.DEVLEN;
        devMinor = (int) TarUtils.parseOctal(header, offset, TarConstants.DEVLEN);
    }
private void parseTarHeader ( final byte [ ] header ) { int offset = 0 ; name = TarUtils . parseName ( header , offset , NAMELEN ) ; offset += NAMELEN ; mode = ( int ) TarUtils . parseOctal ( header , offset , TarConstants . MODELEN ) ; offset += TarConstants . MODELEN ; userID = ( int ) TarUtils . parseOctal ( header , offset , TarConstants . UIDLEN ) ; offset += TarConstants . UIDLEN ; groupID = ( int ) TarUtils . parseOctal ( header , offset , TarConstants . GIDLEN ) ; offset += TarConstants . GIDLEN ; size = TarUtils . parseOctal ( header , offset , TarConstants . SIZELEN ) ; offset += TarConstants . SIZELEN ; modTime = TarUtils . parseOctal ( header , offset , TarConstants . MODTIMELEN ) ; offset += TarConstants . MODTIMELEN ; checkSum = ( int ) TarUtils . parseOctal ( header , offset , TarConstants . CHKSUMLEN ) ; offset += TarConstants . CHKSUMLEN ; linkFlag = header [ offset ++ ] ; linkName = TarUtils . parseName ( header , offset , NAMELEN ) ; offset += NAMELEN ; magic = TarUtils . parseName ( header , offset , TarConstants . MAGICLEN ) ; offset += TarConstants . MAGICLEN ; userName = TarUtils . parseName ( header , offset , TarConstants . UNAMELEN ) ; offset += TarConstants . UNAMELEN ; groupName = TarUtils . parseName ( header , offset , TarConstants . GNAMELEN ) ; offset += TarConstants . GNAMELEN ; devMajor = ( int ) TarUtils . parseOctal ( header , offset , TarConstants . DEVLEN ) ; offset += TarConstants . DEVLEN ; devMinor = ( int ) TarUtils . parseOctal ( header , offset , TarConstants . DEVLEN ) ; }
Parse an entry's header information from a header buffer.
Parse an entry ' s header information from a header buffer .