Package org.apache.sis.internal.netcdf

Examples of org.apache.sis.internal.netcdf.Decoder


     * @throws DataStoreException Should never happen.
     */
    @Test
    public void testDecoderFromStream() throws IOException, DataStoreException {
        final StorageConnector c = new StorageConnector(IOTestCase.getResourceAsStream(NCEP));
        final Decoder decoder = NetcdfStoreProvider.decoder(TestCase.LISTENERS, c);
        assertInstanceOf(NCEP, ChannelDecoder.class, decoder);
        decoder.close();
    }
View Full Code Here


     * @throws DataStoreException Should never happen.
     */
    @Test
    public void testDecoderFromUCAR() throws IOException, DataStoreException {
        final StorageConnector c = new StorageConnector(open(NCEP));
        final Decoder decoder = NetcdfStoreProvider.decoder(TestCase.LISTENERS, c);
        assertInstanceOf(NCEP, DecoderWrapper.class, decoder);
        decoder.close();
    }
View Full Code Here

     * @throws IOException Should never happen.
     */
    @Test
    public void testEmbedded() throws IOException {
        final Metadata metadata;
        final Decoder input = ChannelDecoderTest.createChannelDecoder(NCEP);
        try {
            metadata = new MetadataReader(input).read();
        } finally {
            input.close();
        }
        compareToExpected(metadata);
    }
View Full Code Here

     * @throws IOException Should never happen.
     */
    @Test
    public void testUCAR() throws IOException {
        final Metadata metadata;
        final Decoder input = new DecoderWrapper(TestCase.LISTENERS, new NetcdfDataset(open(NCEP)));
        try {
            metadata = new MetadataReader(input).read();
        } finally {
            input.close();
        }
        compareToExpected(metadata);
    }
View Full Code Here

     * @throws DataStoreException If a logical error (other than I/O) occurred.
     */
    static Decoder decoder(final WarningListeners<?> listeners, final StorageConnector storage)
            throws IOException, DataStoreException
    {
        Decoder decoder;
        Object keepOpen;
        final ChannelDataInput input = storage.getStorageAs(ChannelDataInput.class);
        if (input != null) try {
            decoder = new ChannelDecoder(listeners, input);
            keepOpen = input;
View Full Code Here

     * @throws DataStoreException If a logical error (other than I/O) occurred.
     */
    static Decoder decoder(final WarningListeners<?> listeners, final StorageConnector storage)
            throws IOException, DataStoreException
    {
        Decoder decoder;
        Object keepOpen;
        final ChannelDataInput input = storage.getStorageAs(ChannelDataInput.class);
        if (input != null) try {
            decoder = new ChannelDecoder(listeners, input);
            keepOpen = input;
View Full Code Here

     * @throws DataStoreException Should never happen.
     */
    @Test
    public void testDecoderFromStream() throws IOException, DataStoreException {
        final StorageConnector c = new StorageConnector(IOTestCase.getResourceAsStream(NCEP));
        final Decoder decoder = NetcdfStoreProvider.decoder(TestCase.LISTENERS, c);
        assertInstanceOf(NCEP, ChannelDecoder.class, decoder);
        decoder.close();
    }
View Full Code Here

     * @throws DataStoreException Should never happen.
     */
    @Test
    public void testDecoderFromUCAR() throws IOException, DataStoreException {
        final StorageConnector c = new StorageConnector(open(NCEP));
        final Decoder decoder = NetcdfStoreProvider.decoder(TestCase.LISTENERS, c);
        assertInstanceOf(NCEP, DecoderWrapper.class, decoder);
        decoder.close();
    }
View Full Code Here

     * @throws IOException Should never happen.
     */
    @Test
    public void testEmbedded() throws IOException {
        final Metadata metadata;
        final Decoder input = ChannelDecoderTest.createChannelDecoder(NCEP);
        try {
            metadata = new MetadataReader(input).read();
        } finally {
            input.close();
        }
        compareToExpected(metadata);
    }
View Full Code Here

     * @throws IOException Should never happen.
     */
    @Test
    public void testUCAR() throws IOException {
        final Metadata metadata;
        final Decoder input = new DecoderWrapper(TestCase.LISTENERS, new NetcdfDataset(open(NCEP)));
        try {
            metadata = new MetadataReader(input).read();
        } finally {
            input.close();
        }
        compareToExpected(metadata);
    }
View Full Code Here

TOP

Related Classes of org.apache.sis.internal.netcdf.Decoder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.