Class PdiFile


  • public class PdiFile
    extends java.lang.Object
    Support for reading PRICOM ".pdi" files

    The PRICOM format documentation is Copyright 2003, 2005, PRICOM Corp. They have kindly given permission for this use.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) int address  
      (package private) java.lang.String comment  
      (package private) int commentLength  
      (package private) java.io.File file  
      (package private) int fileLength  
      (package private) int lastAddress  
    • Constructor Summary

      Constructors 
      Constructor Description
      PdiFile​(java.io.File file)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getComment()
      Return the comment embedded at the front of the file.
      byte[] getNext​(int n)
      Get the next n bytes for transmission to the device
      (package private) int length()  
      void open()  
      void open​(java.io.InputStream stream)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PdiFile

        public PdiFile​(java.io.File file)
    • Method Detail

      • open

        public void open()
                  throws java.io.IOException
        Throws:
        java.io.IOException
      • open

        public void open​(java.io.InputStream stream)
                  throws java.io.IOException
        Throws:
        java.io.IOException
      • getComment

        public java.lang.String getComment()
        Return the comment embedded at the front of the file.
        Returns:
        file comment.
      • getNext

        public byte[] getNext​(int n)
        Get the next n bytes for transmission to the device
        Parameters:
        n - number of data bytes to include
        Returns:
        byte buffer, starting with address info and containing data, but not CRC