Java Code Examples for com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream

The following examples show how to use com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream. These examples are extracted from open source projects. 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
/**
 * Creates a DigesterOutputStream.
 *
 * @param md the MessageDigest
 * @param buffer if true, caches the input bytes
 */
public DigesterOutputStream(MessageDigest md, boolean buffer) {
    this.md = md;
    this.buffer = buffer;
    if (buffer) {
        bos = new UnsyncByteArrayOutputStream();
    }
}
 
Example 2
public static void main(String[] args) throws Exception {
    try {
        UnsyncByteArrayOutputStream out = new UnsyncByteArrayOutputStream();
        out.write(new byte[(8192) << 2 + 1]);
        System.out.println("PASSED");
    } catch (ArrayIndexOutOfBoundsException e) {
        System.err.println("FAILED, got ArrayIndexOutOfBoundsException");
        throw new Exception(e);
    }
}
 
Example 3
/**
 * Creates a DigesterOutputStream.
 *
 * @param md the MessageDigest
 * @param buffer if true, caches the input bytes
 */
public DigesterOutputStream(MessageDigest md, boolean buffer) {
    this.md = md;
    this.buffer = buffer;
    if (buffer) {
        bos = new UnsyncByteArrayOutputStream();
    }
}
 
Example 4
public static void main(String[] args) throws Exception {
    try {
        UnsyncByteArrayOutputStream out = new UnsyncByteArrayOutputStream();
        out.write(new byte[(8192) << 2 + 1]);
        System.out.println("PASSED");
    } catch (ArrayIndexOutOfBoundsException e) {
        System.err.println("FAILED, got ArrayIndexOutOfBoundsException");
        throw new Exception(e);
    }
}
 
Example 5
Source Project: jdk8u60   Source File: DigesterOutputStream.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Creates a DigesterOutputStream.
 *
 * @param md the MessageDigest
 * @param buffer if true, caches the input bytes
 */
public DigesterOutputStream(MessageDigest md, boolean buffer) {
    this.md = md;
    this.buffer = buffer;
    if (buffer) {
        bos = new UnsyncByteArrayOutputStream();
    }
}
 
Example 6
Source Project: jdk8u60   Source File: BufferOverflowTest.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static void main(String[] args) throws Exception {
    try {
        UnsyncByteArrayOutputStream out = new UnsyncByteArrayOutputStream();
        out.write(new byte[(8192) << 2 + 1]);
        System.out.println("PASSED");
    } catch (ArrayIndexOutOfBoundsException e) {
        System.err.println("FAILED, got ArrayIndexOutOfBoundsException");
        throw new Exception(e);
    }
}
 
Example 7
/**
 * Creates a DigesterOutputStream.
 *
 * @param md the MessageDigest
 * @param buffer if true, caches the input bytes
 */
public DigesterOutputStream(MessageDigest md, boolean buffer) {
    this.md = md;
    this.buffer = buffer;
    if (buffer) {
        bos = new UnsyncByteArrayOutputStream();
    }
}
 
Example 8
public static void main(String[] args) throws Exception {
    try {
        UnsyncByteArrayOutputStream out = new UnsyncByteArrayOutputStream();
        out.write(new byte[(8192) << 2 + 1]);
        System.out.println("PASSED");
    } catch (ArrayIndexOutOfBoundsException e) {
        System.err.println("FAILED, got ArrayIndexOutOfBoundsException");
        throw new Exception(e);
    }
}
 
Example 9
/**
 * Creates a DigesterOutputStream.
 *
 * @param md the MessageDigest
 * @param buffer if true, caches the input bytes
 */
public DigesterOutputStream(MessageDigest md, boolean buffer) {
    this.md = md;
    this.buffer = buffer;
    if (buffer) {
        bos = new UnsyncByteArrayOutputStream();
    }
}
 
Example 10
public static void main(String[] args) throws Exception {
    try {
        UnsyncByteArrayOutputStream out = new UnsyncByteArrayOutputStream();
        out.write(new byte[(8192) << 2 + 1]);
        System.out.println("PASSED");
    } catch (ArrayIndexOutOfBoundsException e) {
        System.err.println("FAILED, got ArrayIndexOutOfBoundsException");
        throw new Exception(e);
    }
}
 
Example 11
/**
 * Creates a DigesterOutputStream.
 *
 * @param md the MessageDigest
 * @param buffer if true, caches the input bytes
 */
public DigesterOutputStream(MessageDigest md, boolean buffer) {
    this.md = md;
    this.buffer = buffer;
    if (buffer) {
        bos = new UnsyncByteArrayOutputStream();
    }
}
 
Example 12
public static void main(String[] args) throws Exception {
    try {
        UnsyncByteArrayOutputStream out = new UnsyncByteArrayOutputStream();
        out.write(new byte[(8192) << 2 + 1]);
        System.out.println("PASSED");
    } catch (ArrayIndexOutOfBoundsException e) {
        System.err.println("FAILED, got ArrayIndexOutOfBoundsException");
        throw new Exception(e);
    }
}
 
Example 13
/**
 * Creates a DigesterOutputStream.
 *
 * @param md the MessageDigest
 * @param buffer if true, caches the input bytes
 */
public DigesterOutputStream(MessageDigest md, boolean buffer) {
    this.md = md;
    this.buffer = buffer;
    if (buffer) {
        bos = new UnsyncByteArrayOutputStream();
    }
}
 
Example 14
Source Project: jdk8u-jdk   Source File: BufferOverflowTest.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static void main(String[] args) throws Exception {
    try {
        UnsyncByteArrayOutputStream out = new UnsyncByteArrayOutputStream();
        out.write(new byte[(8192) << 2 + 1]);
        System.out.println("PASSED");
    } catch (ArrayIndexOutOfBoundsException e) {
        System.err.println("FAILED, got ArrayIndexOutOfBoundsException");
        throw new Exception(e);
    }
}
 
Example 15
Source Project: hottub   Source File: DigesterOutputStream.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Creates a DigesterOutputStream.
 *
 * @param md the MessageDigest
 * @param buffer if true, caches the input bytes
 */
public DigesterOutputStream(MessageDigest md, boolean buffer) {
    this.md = md;
    this.buffer = buffer;
    if (buffer) {
        bos = new UnsyncByteArrayOutputStream();
    }
}
 
Example 16
Source Project: hottub   Source File: BufferOverflowTest.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static void main(String[] args) throws Exception {
    try {
        UnsyncByteArrayOutputStream out = new UnsyncByteArrayOutputStream();
        out.write(new byte[(8192) << 2 + 1]);
        System.out.println("PASSED");
    } catch (ArrayIndexOutOfBoundsException e) {
        System.err.println("FAILED, got ArrayIndexOutOfBoundsException");
        throw new Exception(e);
    }
}
 
Example 17
/**
 * Creates a DigesterOutputStream.
 *
 * @param md the MessageDigest
 * @param buffer if true, caches the input bytes
 */
public DigesterOutputStream(MessageDigest md, boolean buffer) {
    this.md = md;
    this.buffer = buffer;
    if (buffer) {
        bos = new UnsyncByteArrayOutputStream();
    }
}
 
Example 18
public static void main(String[] args) throws Exception {
    try {
        UnsyncByteArrayOutputStream out = new UnsyncByteArrayOutputStream();
        out.write(new byte[(8192) << 2 + 1]);
        System.out.println("PASSED");
    } catch (ArrayIndexOutOfBoundsException e) {
        System.err.println("FAILED, got ArrayIndexOutOfBoundsException");
        throw new Exception(e);
    }
}
 
Example 19
/**
 * Creates a DigesterOutputStream.
 *
 * @param md the MessageDigest
 * @param buffer if true, caches the input bytes
 */
public DigesterOutputStream(MessageDigest md, boolean buffer) {
    this.md = md;
    this.buffer = buffer;
    if (buffer) {
        bos = new UnsyncByteArrayOutputStream();
    }
}
 
Example 20
Source Project: openjdk-8   Source File: BufferOverflowTest.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static void main(String[] args) throws Exception {
    try {
        UnsyncByteArrayOutputStream out = new UnsyncByteArrayOutputStream();
        out.write(new byte[(8192) << 2 + 1]);
        System.out.println("PASSED");
    } catch (ArrayIndexOutOfBoundsException e) {
        System.err.println("FAILED, got ArrayIndexOutOfBoundsException");
        throw new Exception(e);
    }
}
 
Example 21
/**
 * Creates a DigesterOutputStream.
 *
 * @param md the MessageDigest
 * @param buffer if true, caches the input bytes
 */
public DigesterOutputStream(MessageDigest md, boolean buffer) {
    this.md = md;
    this.buffer = buffer;
    if (buffer) {
        bos = new UnsyncByteArrayOutputStream();
    }
}
 
Example 22
Source Project: jdk8u_jdk   Source File: BufferOverflowTest.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static void main(String[] args) throws Exception {
    try {
        UnsyncByteArrayOutputStream out = new UnsyncByteArrayOutputStream();
        out.write(new byte[(8192) << 2 + 1]);
        System.out.println("PASSED");
    } catch (ArrayIndexOutOfBoundsException e) {
        System.err.println("FAILED, got ArrayIndexOutOfBoundsException");
        throw new Exception(e);
    }
}
 
Example 23
/**
 * Creates a DigesterOutputStream.
 *
 * @param md the MessageDigest
 * @param buffer if true, caches the input bytes
 */
public DigesterOutputStream(MessageDigest md, boolean buffer) {
    this.md = md;
    this.buffer = buffer;
    if (buffer) {
        bos = new UnsyncByteArrayOutputStream();
    }
}
 
Example 24
Source Project: jdk8u-jdk   Source File: BufferOverflowTest.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static void main(String[] args) throws Exception {
    try {
        UnsyncByteArrayOutputStream out = new UnsyncByteArrayOutputStream();
        out.write(new byte[(8192) << 2 + 1]);
        System.out.println("PASSED");
    } catch (ArrayIndexOutOfBoundsException e) {
        System.err.println("FAILED, got ArrayIndexOutOfBoundsException");
        throw new Exception(e);
    }
}
 
Example 25
/**
 * Creates a DigesterOutputStream.
 *
 * @param md the MessageDigest
 * @param buffer if true, caches the input bytes
 */
public DigesterOutputStream(MessageDigest md, boolean buffer) {
    this.md = md;
    this.buffer = buffer;
    if (buffer) {
        bos = new UnsyncByteArrayOutputStream();
    }
}
 
Example 26
public static void main(String[] args) throws Exception {
    try {
        UnsyncByteArrayOutputStream out = new UnsyncByteArrayOutputStream();
        out.write(new byte[(8192) << 2 + 1]);
        System.out.println("PASSED");
    } catch (ArrayIndexOutOfBoundsException e) {
        System.err.println("FAILED, got ArrayIndexOutOfBoundsException");
        throw new Exception(e);
    }
}