Examples of truncate()


Examples of com.sun.midp.io.j2me.storage.RandomAccessStream.truncate()

            for (int i = 0; i < len; i++) {
                dos.write((byte[]) CSRs.elementAt(i));
            }
            dos.flush();
            dos.close();
            storage.truncate(4 + len * 20);
        } catch (IOException openwe) {} // ignored
        finally {
            try {
                storage.disconnect();
            } catch (IOException e) {} // ignored
View Full Code Here

Examples of com.sun.star.io.XTruncate.truncate()

                    // we will only deal with simple file write
                    XOutputStream xos = m_xSimpleFileAccess.openFileWrite( path );
                    XTruncate xtrunc = ( XTruncate ) UnoRuntime.queryInterface( XTruncate.class, xos );
                    if ( xtrunc != null )
                    {
                        xtrunc.truncate();
                    }
                    os = new XOutputStreamWrapper( xos );
                }
                if ( os == null )
                {
View Full Code Here

Examples of de.sciss.io.InterleavedStreamFile.truncate()

    afd.file      = new File( dir, getName() + SUFFIX_DISTANCE );
    iff          = AudioFile.openAsWrite( afd );
           
    frameBuf[ 0 ]    = distanceTable;
    iff.writeFrames( frameBuf, 0, distanceTable.length );
    iff.truncate();
    iff.close();

    afd          = new AudioFileDescr( afd );
    afd.file      = new File( dir, getName() + SUFFIX_ROTATION );
    iff          = AudioFile.openAsWrite( afd );
View Full Code Here

Examples of flanagan.math.ArrayMaths.truncate()

        // print an array of Doubles to screen with truncation
        // No line returns except at the end
        public static void print(Double[] aa, int trunc){
            ArrayMaths am = new ArrayMaths(aa);
            am = am.truncate(trunc);
            Double[] aaa = am.array_as_Double();
            for(int i=0; i<aa.length; i++){
                System.out.print(aaa[i]+"   ");
            }
            System.out.println();
View Full Code Here

Examples of in.partake.model.dao.access.IEventAccess.truncate()

        // Create 20 events here.
        new Transaction<Void>() {
            @Override
            protected Void doExecute(PartakeConnection con, IPartakeDAOs daos) throws DAOException, PartakeException {
                IEventAccess dao = daos.getEventAccess();
                dao.truncate(con);

                for (int i = 0; i < N; ++i) {
                    dao.put(con, new Event(ids.get(i), "title", "summary", "category",
                            new DateTime(i), null, "url", "place",
                            "address", "description", "#hashTag", TestDataProvider.EVENT_OWNER_ID,
View Full Code Here

Examples of in.partake.model.dao.access.IEventAccess.truncate()

        return array;
    }

    public void createFixtures(PartakeConnection con, IPartakeDAOs daos) throws DAOException {
        IEventAccess dao = daos.getEventAccess();
        dao.truncate(con);

        DateTime now = TimeUtil.getCurrentDateTime();
        DateTime late = now.nDayAfter(1);
        String category = EventCategory.getCategories().get(0).getKey();
View Full Code Here

Examples of in.partake.model.dao.access.IEventAccess.truncate()

        // Create 20 events here.
        new Transaction<Void>() {
            @Override
            protected Void doExecute(PartakeConnection con, IPartakeDAOs daos) throws DAOException, PartakeException {
                IEventAccess dao = daos.getEventAccess();
                dao.truncate(con);

                for (int i = 0; i < N; ++i) {
                    boolean isPrivate = i % 8 == 0;
                    boolean draft = i % 8 == 1;
                    dao.put(con, new Event(ids.get(i), "title", "summary", "category",
View Full Code Here

Examples of in.partake.model.dao.access.IEventActivityAccess.truncate()

    }

    @Override
    public void createFixtures(PartakeConnection con, IPartakeDAOs daos) throws DAOException {
        IEventActivityAccess dao = daos.getEventActivityAccess();
        dao.truncate(con);
    }
}
View Full Code Here

Examples of in.partake.model.dao.access.IEventCommentAccess.truncate()

    }

    @Override
    public void createFixtures(PartakeConnection con, IPartakeDAOs daos) throws DAOException {
        IEventCommentAccess dao = daos.getCommentAccess();
        dao.truncate(con);

        DateTime now = TimeUtil.getCurrentDateTime();

        dao.put(con, new EventComment(OWNER_COMMENT_ID, DEFAULT_EVENT_ID, EVENT_OWNER_ID, "comment", false, now));
        dao.put(con, new EventComment(EDITOR_COMMENT_ID, DEFAULT_EVENT_ID, EVENT_EDITOR_ID, "comment", false, now));
View Full Code Here

Examples of in.partake.model.dao.access.IEventTicketAccess.truncate()

    }

    @Override
    public void createFixtures(PartakeConnection con, IPartakeDAOs daos) throws DAOException {
        IEventTicketAccess dao = daos.getEventTicketAccess();
        dao.truncate(con);

        dao.put(con, EventTicket.createDefaultTicket(DEFAULT_EVENT_TICKET_ID, DEFAULT_EVENT_ID));
        dao.put(con, EventTicket.createDefaultTicket(PRIVATE_EVENT_TICKET_ID, PRIVATE_EVENT_ID));
        dao.put(con, EventTicket.createDefaultTicket(JAPANESE_EVENT_TICKET_ID, JAPANESE_EVENT_ID));
        dao.put(con, EventTicket.createDefaultTicket(UNIQUEIDENTIFIER_EVENT_TICKET_ID, UNIQUEIDENTIFIER_EVENT_ID));
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.