<commit_before>/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * http://www.apache.org/licenses/LICENSE-2.0
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package net.kazzz.felica.command;

import net.kazzz.felica.lib.FeliCaLib;
import net.kazzz.felica.lib.FeliCaLib.CommandResponse;
import net.kazzz.felica.lib.Util;

import java.util.Arrays;

/**
 * Read コマンドのレスポンスを抽象化したクラスを提供します
 *
 * @author Kazzz
 * @date 2011/01/22
 * @since Android API Level 9
 */

public class ReadResponse extends CommandResponse {
    final int statusFlag1;
    final int statusFlag2;
    final int blockCount;
    final byte[] blockData;

    /**
     * コンストラクタ
     *
     * @param response コマンド実行結果で戻ったバイト列をセット
     */
    public ReadResponse(CommandResponse response) {
        super(response);
        this.statusFlag1 = this.data[0];
        this.statusFlag2 = this.data[1];
        if (this.getStatusFlag1() == 0) {<commit_msg>Add handler for brute-forced ReadResponse.<commit_after>/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * http://www.apache.org/licenses/LICENSE-2.0
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package net.kazzz.felica.command;

import net.kazzz.felica.lib.FeliCaLib;
import net.kazzz.felica.lib.FeliCaLib.CommandResponse;
import net.kazzz.felica.lib.Util;

import java.util.Arrays;

/**
 * Read コマンドのレスポンスを抽象化したクラスを提供します
 *
 * @author Kazzz
 * @date 2011/01/22
 * @since Android API Level 9
 */

public class ReadResponse extends CommandResponse {
    final int statusFlag1;
    final int statusFlag2;
    final int blockCount;
    final byte[] blockData;

    /**
     * コンストラクタ
     *
     * @param response コマンド実行結果で戻ったバイト列をセット
     */
    public ReadResponse(CommandResponse response) {
        super(response);
        if (this.data == null) {
            // Tried to read a block which doesn't exist
            this.blockCount = 0;
            this.blockData = null;
            this.statusFlag1 = 0xffff;
            this.statusFlag2 = 0xffff;
            return;
        }

        this.statusFlag1 = this.data[0];
        this.statusFlag2 = this.data[1];
        if (this.getStatusFlag1() == 0) {
{'fraction_non_alphanumeric': 0.08995247793618466, 'fraction_numerical': 0.015953835709436523, 'mean_word_length': 3.0425240054869684, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3136271', 'n_tokens_mistral': 951, 'n_tokens_neox': 914, 'n_words': 288}