Java String Ends With endsWithFFD9(byte[] data)

Here you can find the source of endsWithFFD9(byte[] data)

Description

ends With FFD

License

Open Source License

Declaration

private static boolean endsWithFFD9(byte[] data) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) JavaPEG developers//  www.java  2 s .  com
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/

public class Main {
    private static boolean endsWithFFD9(byte[] data) {
        return (data[data.length - 2] & 0xFF) == 255 && (data[data.length - 1] & 0xFF) == 217;
    }
}

Related

  1. endsWithContinuationMarker(String line)
  2. endsWithCVC(String str)
  3. endsWithDigit(final String s)
  4. endsWithDoubleConsonent(String str)
  5. endsWithExtension(final String fileName, final String extension)
  6. endsWithGaps(final byte[] aFrag, final int numEndGaps)
  7. endsWithIC(String a, String b)
  8. endsWithIC(String s1, String s2)
  9. endsWithIgnoreCase(final String base, final String end)