class SegmentTypeBox extends AbstractBox {
    public static final String TYPE = "styp";

    private String majorBrand;
    private long minorVersion;
    private List<String> compatibleBrands = Collections.emptyList();

    public SegmentTypeBox() {
        super(TYPE);
    }

    public SegmentTypeBox(String majorBrand, long minorVersion, List<String> compatibleBrands) {
        super(TYPE);
        this.majorBrand = majorBrand;
        this.minorVersion = minorVersion;
        this.compatibleBrands = compatibleBrands;
    }

    protected long getContentSize() {
        return 8 + compatibleBrands.size() * 4;

    }

    @Override
    public void _parseDetails(ByteBuffer content) {
        majorBrand = IsoTypeReader.read4cc(content);
        minorVersion = IsoTypeReader.readUInt32(content);
        int compatibleBrandsCount = content.remaining() / 4;
        compatibleBrands = new LinkedList<String>();
        for (int i = 0; i < compatibleBrandsCount; i++) {
            compatibleBrands.add(IsoTypeReader.read4cc(content));
        }
    }

    @Override
    protected void getContent(ByteBuffer byteBuffer) {
        byteBuffer.put(IsoFile.fourCCtoBytes(majorBrand));
        IsoTypeWriter.writeUInt32(byteBuffer, minorVersion);
        for (String compatibleBrand : compatibleBrands) {
            byteBuffer.put(IsoFile.fourCCtoBytes(compatibleBrand));
        }

    }

    /**
     * Gets the brand identifier.
     *
     * @return the brand identifier
     */
    public String getMajorBrand() {
        return majorBrand;
    }

    /**
     * Sets the major brand of the file used to determine an appropriate reader.
     *
     * @param majorBrand the new major brand
     */
    public void setMajorBrand(String majorBrand) {
        this.majorBrand = majorBrand;
    }

    /**
     * Gets an informative integer for the minor version of the major brand.
     *
     * @return an informative integer
     * @see SegmentTypeBox#getMajorBrand()
     */
    public long getMinorVersion() {
        return minorVersion;
    }

    /**
     * Sets the "informative integer for the minor version of the major brand".
     *
     * @param minorVersion the version number of the major brand
     */
    public void setMinorVersion(long minorVersion) {
        this.minorVersion = minorVersion;
    }

    /**
     * Gets an array of 4-cc brands.
     *
     * @return the compatible brands
     */
    public List<String> getCompatibleBrands() {
        return compatibleBrands;
    }

    public void setCompatibleBrands(List<String> compatibleBrands) {
        this.compatibleBrands = compatibleBrands;
    }

    @DoNotParseDetail
    public String toString() {<FILL_FUNCTION_BODY>}
}

        StringBuilder result = new StringBuilder();
        result.append("SegmentTypeBox[");
        result.append("majorBrand=").append(getMajorBrand());
        result.append(";");
        result.append("minorVersion=").append(getMinorVersion());
        for (String compatibleBrand : compatibleBrands) {
            result.append(";");
            result.append("compatibleBrand=").append(compatibleBrand);
        }
        result.append("]");
        return result.toString();
    
<methods>public void getBox(java.nio.channels.WritableByteChannel) throws java.io.IOException,public long getSize() ,public java.lang.String getType() ,public byte[] getUserType() ,public boolean isParsed() ,public void parse(java.nio.channels.ReadableByteChannel, java.nio.ByteBuffer, long, org.mp4parser.BoxParser) throws java.io.IOException,public final synchronized void parseDetails() <variables>private static org.slf4j.Logger LOG,protected java.nio.ByteBuffer content,private java.nio.ByteBuffer deadBytes,boolean isParsed,protected java.lang.String type,private byte[] userType