Examples of XInputStreamImpl


Examples of com.google.code.or.io.impl.XInputStreamImpl

  /**
   *
   */
  public XDeserializer(byte[] data) {
    this.tis = new XInputStreamImpl(new ByteArrayInputStream(data));
  }
View Full Code Here

Examples of com.google.code.or.io.impl.XInputStreamImpl

  /**
   *
   */
  protected XInputStream open(String path) throws Exception {
    //
    final XInputStream is = new XInputStreamImpl(new RamdomAccessFileInputStream(new File(path)));
    try {
      // Check binlog magic
      final byte[] magic = is.readBytes(MySQLConstants.BINLOG_MAGIC.length);
      if(!CodecUtils.equals(magic, MySQLConstants.BINLOG_MAGIC)) {
        throw new NestableRuntimeException("invalid binlog magic, file: " + path);
      }
     
      //
      if(this.startPosition > MySQLConstants.BINLOG_MAGIC.length) {
        is.skip(this.startPosition - MySQLConstants.BINLOG_MAGIC.length);
      }
      return is;
    } catch(Exception e) {
      IOUtils.closeQuietly(is);
      throw e;
View Full Code Here

Examples of com.google.code.or.io.impl.XInputStreamImpl

  /**
   *
   */
  protected XInputStream open(String path) throws Exception {
    //
    final XInputStream is = new XInputStreamImpl(new RamdomAccessFileInputStream(new File(path)));
    try {
      // Check binlog magic
      final byte[] magic = is.readBytes(MySQLConstants.BINLOG_MAGIC.length);
      if(!CodecUtils.equals(magic, MySQLConstants.BINLOG_MAGIC)) {
        throw new RuntimeException("invalid binlog magic, file: " + path);
      }
     
      //
      if(this.startPosition > MySQLConstants.BINLOG_MAGIC.length) {
        is.skip(this.startPosition - MySQLConstants.BINLOG_MAGIC.length);
      }
      return is;
    } catch(Exception e) {
      IOUtils.closeQuietly(is);
      throw e;
View Full Code Here

Examples of com.google.code.or.io.impl.XInputStreamImpl

  /**
   *
   */
  public XDeserializer(byte[] data) {
    this.tis = new XInputStreamImpl(new ByteArrayInputStream(data));
  }
View Full Code Here

Examples of com.google.code.or.io.impl.XInputStreamImpl

  /**
   *
   */
  public XDeserializer(byte[] data) {
    this.tis = new XInputStreamImpl(new ByteArrayInputStream(data));
  }
View Full Code Here

Examples of com.sun.star.script.framework.io.XInputStreamImpl

                UnoRuntime.queryInterface( XSimpleFileAccess2.class,
                    parent.m_xSFA );
            if ( xSFA2 != null )
            {
                ByteArrayInputStream bis = new ByteArrayInputStream( getSourceBytes() );
                XInputStreamImpl xis = new XInputStreamImpl( bis );
                xSFA2.writeFile( sourceFilePath, xis );
                xis.closeInput();
                result = true;
            }
        }
        // TODO re-examine exception processing should probably throw
        // exceptions back to caller
View Full Code Here

Examples of com.sun.star.script.framework.io.XInputStreamImpl

                UnoRuntime.queryInterface( XSimpleFileAccess2.class,
                    parent.m_xSFA );
            if ( xSFA2 != null )
            {
                ByteArrayInputStream bis = new ByteArrayInputStream( getSourceBytes() );
                XInputStreamImpl xis = new XInputStreamImpl( bis );
                xSFA2.writeFile( sourceFilePath, xis );
                xis.closeInput();
                result = true;
            }
        }
        // TODO re-examine exception processing should probably throw
        // exceptions back to caller
View Full Code Here

Examples of com.sun.star.script.framework.io.XInputStreamImpl

                UnoRuntime.queryInterface( XSimpleFileAccess2.class,
                    parent.m_xSFA );
            if ( xSFA2 != null )
            {
                ByteArrayInputStream bis = new ByteArrayInputStream( getSourceBytes() );
                XInputStreamImpl xis = new XInputStreamImpl( bis );
                xSFA2.writeFile( sourceFilePath, xis );
                xis.closeInput();
                result = true;
            }
        }
        // TODO re-examine exception processing should probably throw
        // exceptions back to caller
View Full Code Here

Examples of com.sun.star.script.framework.io.XInputStreamImpl

                UnoRuntime.queryInterface( XSimpleFileAccess2.class,
                    parent.m_xSFA );
            if ( xSFA2 != null )
            {
                ByteArrayInputStream bis = new ByteArrayInputStream( getSourceBytes() );
                XInputStreamImpl xis = new XInputStreamImpl( bis );
                xSFA2.writeFile( sourceFilePath, xis );
                xis.closeInput();
                result = true;
            }
        }
        // TODO re-examine exception processing should probably throw
        // exceptions back to caller
View Full Code Here

Examples of com.sun.star.script.framework.io.XInputStreamImpl

                UnoRuntime.queryInterface( XSimpleFileAccess2.class,
                    parent.m_xSFA );
            if ( xSFA2 != null )
            {
                ByteArrayInputStream bis = new ByteArrayInputStream( getSourceBytes() );
                XInputStreamImpl xis = new XInputStreamImpl( bis );
                xSFA2.writeFile( sourceFilePath, xis );
                xis.closeInput();
                result = true;
            }
        }
        // TODO re-examine exception processing should probably throw
        // exceptions back to caller
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.