Java Code Examples for com.android.dx.util.AnnotatedOutput#alignTo()

The following examples show how to use com.android.dx.util.AnnotatedOutput#alignTo() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OffsettedItem.java    From Box with Apache License 2.0 6 votes vote down vote up
/** {@inheritDoc} */
@Override
public final void writeTo(DexFile file, AnnotatedOutput out) {
    out.alignTo(alignment);

    try {
        if (writeSize < 0) {
            throw new UnsupportedOperationException(
                    "writeSize is unknown");
        }
        out.assertCursor(getAbsoluteOffset());
    } catch (RuntimeException ex) {
        throw ExceptionWithContext.withContext(ex,
                "...while writing " + this);
    }

    writeTo0(file, out);
}
 
Example 2
Source File: OffsettedItem.java    From Box with Apache License 2.0 6 votes vote down vote up
/** {@inheritDoc} */
@Override
public final void writeTo(DexFile file, AnnotatedOutput out) {
    out.alignTo(alignment);

    try {
        if (writeSize < 0) {
            throw new UnsupportedOperationException(
                    "writeSize is unknown");
        }
        out.assertCursor(getAbsoluteOffset());
    } catch (RuntimeException ex) {
        throw ExceptionWithContext.withContext(ex,
                "...while writing " + this);
    }

    writeTo0(file, out);
}
 
Example 3
Source File: OffsettedItem.java    From J2ME-Loader with Apache License 2.0 6 votes vote down vote up
/** {@inheritDoc} */
@Override
public final void writeTo(DexFile file, AnnotatedOutput out) {
    out.alignTo(alignment);

    try {
        if (writeSize < 0) {
            throw new UnsupportedOperationException(
                    "writeSize is unknown");
        }
        out.assertCursor(getAbsoluteOffset());
    } catch (RuntimeException ex) {
        throw ExceptionWithContext.withContext(ex,
                "...while writing " + this);
    }

    writeTo0(file, out);
}
 
Example 4
Source File: OffsettedItem.java    From buck with Apache License 2.0 6 votes vote down vote up
/** {@inheritDoc} */
@Override
public final void writeTo(DexFile file, AnnotatedOutput out) {
    out.alignTo(alignment);

    try {
        if (writeSize < 0) {
            throw new UnsupportedOperationException(
                    "writeSize is unknown");
        }
        out.assertCursor(getAbsoluteOffset());
    } catch (RuntimeException ex) {
        throw ExceptionWithContext.withContext(ex,
                "...while writing " + this);
    }

    writeTo0(file, out);
}
 
Example 5
Source File: UniformItemSection.java    From Box with Apache License 2.0 5 votes vote down vote up
/** {@inheritDoc} */
@Override
protected final void writeTo0(AnnotatedOutput out) {
    DexFile file = getFile();
    int alignment = getAlignment();

    for (Item one : items()) {
        one.writeTo(file, out);
        out.alignTo(alignment);
    }
}
 
Example 6
Source File: UniformItemSection.java    From Box with Apache License 2.0 5 votes vote down vote up
/** {@inheritDoc} */
@Override
protected final void writeTo0(AnnotatedOutput out) {
    DexFile file = getFile();
    int alignment = getAlignment();

    for (Item one : items()) {
        one.writeTo(file, out);
        out.alignTo(alignment);
    }
}
 
Example 7
Source File: UniformItemSection.java    From J2ME-Loader with Apache License 2.0 5 votes vote down vote up
/** {@inheritDoc} */
@Override
protected final void writeTo0(AnnotatedOutput out) {
    DexFile file = getFile();
    int alignment = getAlignment();

    for (Item one : items()) {
        one.writeTo(file, out);
        out.alignTo(alignment);
    }
}
 
Example 8
Source File: UniformItemSection.java    From buck with Apache License 2.0 5 votes vote down vote up
/** {@inheritDoc} */
@Override
protected final void writeTo0(AnnotatedOutput out) {
    DexFile file = getFile();
    int alignment = getAlignment();

    for (Item one : items()) {
        one.writeTo(file, out);
        out.alignTo(alignment);
    }
}
 
Example 9
Source File: Section.java    From Box with Apache License 2.0 2 votes vote down vote up
/**
 * Aligns the output of the given data to the alignment of this instance.
 *
 * @param out {@code non-null;} the output to align
 */
protected final void align(AnnotatedOutput out) {
    out.alignTo(alignment);
}
 
Example 10
Source File: Section.java    From Box with Apache License 2.0 2 votes vote down vote up
/**
 * Aligns the output of the given data to the alignment of this instance.
 *
 * @param out {@code non-null;} the output to align
 */
protected final void align(AnnotatedOutput out) {
    out.alignTo(alignment);
}
 
Example 11
Source File: Section.java    From J2ME-Loader with Apache License 2.0 2 votes vote down vote up
/**
 * Aligns the output of the given data to the alignment of this instance.
 *
 * @param out {@code non-null;} the output to align
 */
protected final void align(AnnotatedOutput out) {
    out.alignTo(alignment);
}
 
Example 12
Source File: Section.java    From buck with Apache License 2.0 2 votes vote down vote up
/**
 * Aligns the output of the given data to the alignment of this instance.
 *
 * @param out {@code non-null;} the output to align
 */
protected final void align(AnnotatedOutput out) {
    out.alignTo(alignment);
}