Package java.io

Examples of java.io.DataInputStream.mark()


    long startTime = FSNamesystem.now();

    DataInputStream in = new DataInputStream(new BufferedInputStream(edits));
    try {
      // Read log file version. Could be missing.
      in.mark(4);
      // If edits log is greater than 2G, available method will return negative
      // numbers, so we avoid having to call available
      boolean available = true;
      try {
        logVersion = in.readByte();
View Full Code Here


    if (editsFile.exists()) {
      DataInputStream in = new DataInputStream(
          new BufferedInputStream(
              new FileInputStream(editsFile)));
      // Read log file version. Could be missing.
      in.mark( 4 );
      if( in.available() > 0 ) {
        logVersion = in.readByte();
        in.reset();
        if( logVersion >= 0 )
          logVersion = 0;
View Full Code Here

     */
    public PFBData parsePFB(InputStream in) throws IOException {
        PFBData pfb = new PFBData();
        BufferedInputStream bin = new BufferedInputStream(in);
        DataInputStream din = new DataInputStream(bin);
        din.mark(32);
        int firstByte = din.readUnsignedByte();
        din.reset();
        if (firstByte == 128) {
            pfb.setPFBFormat(PFBData.PFB_PC);
            parsePCFormat(pfb, din);
View Full Code Here

    final boolean isTolerationEnabled = tolerationLength >= 0;
    DataInputStream in = new DataInputStream(tracker);
    Byte opcode = null;
    try {
      // Read log file version. Could be missing.
      in.mark(4);
      // If edits log is greater than 2G, available method will return negative
      // numbers, so we avoid having to call available
      boolean available = true;
      try {
        logVersion = in.readByte();
View Full Code Here

                            "Unsupported version " + logVersion;

      while (true) {
        if (isTolerationEnabled) {
          //mark position could be reset in case of exceptions
          in.mark(TRANSACTION_LENGTH_LIMIT);
        }

        long timestamp = 0;
        long mtime = 0;
        long atime = 0;
View Full Code Here

    if (edits != null) {
      DataInputStream in = new DataInputStream(
          new BufferedInputStream(
              new FileInputStream(edits)));
      // Read log file version. Could be missing.
      in.mark( 4 );
      // If edits log is greater than 2G, available method will return negative
      // numbers, so we avoid having to call available
      boolean available = true;
      try {
        logVersion = in.readByte();
View Full Code Here

    long startTime = FSNamesystem.now();

    DataInputStream in = new DataInputStream(new BufferedInputStream(edits));
    try {
      // Read log file version. Could be missing.
      in.mark(4);
      // If edits log is greater than 2G, available method will return negative
      // numbers, so we avoid having to call available
      boolean available = true;
      try {
        logVersion = in.readByte();
View Full Code Here

     */
    public PFBData parsePFB(InputStream in) throws IOException {
        PFBData pfb = new PFBData();
        BufferedInputStream bin = new BufferedInputStream(in);
        DataInputStream din = new DataInputStream(bin);
        din.mark(32);
        int firstByte = din.readUnsignedByte();
        din.reset();
        if (firstByte == 128) {
            pfb.setPFBFormat(PFBData.PFB_PC);
            parsePCFormat(pfb, din);
View Full Code Here

    if (edits != null) {
      DataInputStream in = new DataInputStream(
          new BufferedInputStream(
              new FileInputStream(edits)));
      // Read log file version. Could be missing.
      in.mark( 4 );
      // If edits log is greater than 2G, available method will return negative
      // numbers, so we avoid having to call available
      boolean available = true;
      try {
        logVersion = in.readByte();
View Full Code Here

     */
    public PFBData parsePFB(InputStream in) throws IOException {
        PFBData pfb = new PFBData();
        BufferedInputStream bin = new BufferedInputStream(in);
        DataInputStream din = new DataInputStream(bin);
        din.mark(32);
        int firstByte = din.readUnsignedByte();
        din.reset();
        if (firstByte == 128) {
            pfb.setPFBFormat(PFBData.PFB_PC);
            parsePCFormat(pfb, din);
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.