Package org.fcrepo.server.errors

Examples of org.fcrepo.server.errors.StreamIOException


                while ((entry = m_zin.getNextEntry()) != null) {
                    FileUtils.copy(m_zin, new FileOutputStream(new File(m_tempDir, entry.getName())));
                }
                in = new FileInputStream(new File(m_tempDir, "atommanifest.xml"));
            } catch (FileNotFoundException e) {
                throw new StreamIOException(e.getMessage(), e);
            } catch (IOException e) {
                throw new StreamIOException(e.getMessage(), e);
            }
        }

        Parser parser = abdera.getParser();
        Document<Feed> feedDoc = parser.parse(in);
View Full Code Here


                } else {
                    ds.xmlContent = entry.getContent().getBytes(m_encoding); //IOUtils.toByteArray(entry.getContentStream());
                }
            } catch (UnsupportedEncodingException e) {
                throw new StreamIOException(e.getMessage(), e);
            } catch (FileNotFoundException e) {
                throw new ObjectIntegrityException(e.getMessage(), e);
            }
        }
View Full Code Here

            MIMETypedStream stream = getExternalContentManager()
                    .getExternalContent(params);
            DSSize = getContentLength(stream);
            return stream.getStream();
        } catch (Exception ex) {
            throw new StreamIOException("Error getting content stream", ex);
        }
    }
View Full Code Here

            } else {
                IOUtils.copy(entry.getContentStream(), out);
            }
            ds.DSLocation = DatastreamManagedContent.TEMP_SCHEME + temp.getAbsolutePath();
        } catch (IOException e) {
            throw new StreamIOException(e.getMessage(), e);
        }

        return ds;
    }
View Full Code Here

                    .getAuditRecords(auditTrail));
            auditTrail.close();
        } catch (XMLStreamException e) {
            throw new ObjectIntegrityException(e.getMessage(), e);
        } catch (IOException e) {
            throw new StreamIOException(e.getMessage(), e);
        }
    }
View Full Code Here

            parser.parse(in, this);
        } catch (SAXException saxe) {
            throw new ObjectIntegrityException("Parse error parsing ObjectFields: "
                    + saxe.getMessage());
        } catch (IOException ioe) {
            throw new StreamIOException("Stream error parsing ObjectFields: "
                    + ioe.getMessage());
        }
    }
View Full Code Here

        m_transContext = transContext;
        initialize();
        try {
            m_parser.parse(in, this);
        } catch (IOException ioe) {
            throw new StreamIOException("Low-level stream IO problem occurred "
                    + "while SAX parsing this object.");
        } catch (SAXException se) {
            throw new ObjectIntegrityException("METS stream was bad : "
                    + se.getMessage());
        }
View Full Code Here

                    m_binaryContentTempFile = null;
                    try {
                        m_binaryContentTempFile =
                                File.createTempFile("binary-datastream", null);
                    } catch (IOException ioe) {
                        throw new SAXException(new StreamIOException("Unable to create temporary file for binary content"));
                    }
                }

            } else if (m_format.equals(METS_EXT1_0)) {
                startDisseminators(localName, a);
View Full Code Here

                                DatastreamManagedContent.TEMP_SCHEME
                                            + m_binaryContentTempFile
                                                    .getAbsolutePath();
                            instantiateDatastream(new DatastreamManagedContent());
                        } catch (FileNotFoundException fnfe) {
                            throw new SAXException(new StreamIOException("Unable to open temporary file created for binary content"));
                        } catch (IOException fnfe) {
                            throw new SAXException(new StreamIOException("Error writing to temporary file created for binary content"));
                        }
                    }
                }
                m_binaryContentTempFile = null;
                m_readingBinaryContent = false;
View Full Code Here

        m_transContext = transContext;
        initialize();
        try {
            m_parser.parse(in, this);
        } catch (IOException ioe) {
            throw new StreamIOException("low-level stream io problem occurred "
                    + "while sax was parsing this object.");
        } catch (SAXException se) {
            throw new ObjectIntegrityException("FOXML IO stream was bad : "
                    + se.getMessage(), se);
        }
View Full Code Here

TOP

Related Classes of org.fcrepo.server.errors.StreamIOException

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.