org.ttzero.excel.entity.e3.CountryParser Maven / Gradle / Ivy
/*
* Copyright (c) 2019-2020, [email protected] All Rights Reserved.
*
* 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 org.ttzero.excel.entity.e3;
/**
* 5.22 COUNTRY
*
* This record stores two Windows country identifiers.
* The first represents the user interface language of
* the Excel version that has saved the file, and the
* second represents the system regional settings at the
* time the file was saved.
*
* @author guanquan.wang at 2019-03-02 11:11
*/
public class CountryParser {
public static short[] get(Block block) {
short size = block.nextShort();
short[] country = new short[2];
// Windows country identifier of the user interface language of Excel
country[0] = block.nextShort();
// Windows country identifier of the system regional settings
country[1] = block.nextShort();
return country;
}
public static short getId() {
return ParserIdentifier.COUNTRY;
}
}